mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Fix service device refresh calling state update (#30920)
This commit is contained in:
committed by
Paulus Schoutsen
parent
7b29a498c6
commit
c9db21ffac
@@ -54,11 +54,13 @@ class DeconzBinarySensor(DeconzDevice, BinarySensorDevice):
|
||||
"""Representation of a deCONZ binary sensor."""
|
||||
|
||||
@callback
|
||||
def async_update_callback(self, force_update=False):
|
||||
def async_update_callback(self, force_update=False, ignore_update=False):
|
||||
"""Update the sensor's state."""
|
||||
changed = set(self._device.changed_keys)
|
||||
if ignore_update:
|
||||
return
|
||||
|
||||
keys = {"on", "reachable", "state"}
|
||||
if force_update or any(key in changed for key in keys):
|
||||
if force_update or self._device.changed_keys.intersection(keys):
|
||||
self.async_schedule_update_ha_state()
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user