1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

Fix for 0.98: Don't update disabled entities (Homematic IP Cloud) (#26236)

* Homematic IP Cloud Fix: Don't update disabled entities

* Added enabled to entity.py

* Update test for enabled

* Update entity.py
This commit is contained in:
SukramJ
2019-08-28 22:38:20 +02:00
committed by Paulus Schoutsen
parent e69953fe2d
commit cf3bb300e6
3 changed files with 17 additions and 2 deletions

View File

@@ -229,6 +229,11 @@ class Entity:
# are used to perform a very specific function. Overwriting these may
# produce undesirable effects in the entity's operation.
@property
def enabled(self):
"""Return if the entity is enabled in the entity registry."""
return self.registry_entry is None or not self.registry_entry.disabled
@callback
def async_set_context(self, context):
"""Set the context the entity currently operates under."""