Improve deCONZ state updates (#40601)
This commit is contained in:
1 parent
ac71641c18
commit
082f866620
6 files changed
+72
-60
No files matched your search
@@ -78,14 +78,11 @@ class DeconzBinarySensor(DeconzDevice, BinarySensorEntity):
|
||||
TYPE = DOMAIN
|
||||
|
||||
@callback
|
||||
def async_update_callback(self, force_update=False, ignore_update=False):
|
||||
def async_update_callback(self, force_update=False):
|
||||
"""Update the sensor's state."""
|
||||
if ignore_update:
|
||||
return
|
||||
|
||||
keys = {"on", "reachable", "state"}
|
||||
if force_update or self._device.changed_keys.intersection(keys):
|
||||
self.async_write_ha_state()
|
||||
super().async_update_callback(force_update=force_update)
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
||||
Reference in new issue
Block a user