mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Used better method for overwritting attributes in entity.
This commit is contained in:
@@ -128,8 +128,7 @@ class Entity(object):
|
|||||||
attr[ATTR_HIDDEN] = self.hidden
|
attr[ATTR_HIDDEN] = self.hidden
|
||||||
|
|
||||||
# overwrite properties that have been set in the config file
|
# overwrite properties that have been set in the config file
|
||||||
for attr_name, val in _OVERWRITE[self.entity_id].items():
|
attr.update(_OVERWRITE.get(self.entity_id, {}))
|
||||||
attr[attr_name] = val
|
|
||||||
|
|
||||||
# remove hidden property if false so it won't show up
|
# remove hidden property if false so it won't show up
|
||||||
if not attr.get(ATTR_HIDDEN, True):
|
if not attr.get(ATTR_HIDDEN, True):
|
||||||
|
Reference in New Issue
Block a user