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:
committed by
Paulus Schoutsen
parent
e69953fe2d
commit
cf3bb300e6
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user