mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Improve deCONZ binary sensor classes (#77419)
This commit is contained in:
@@ -83,6 +83,7 @@ async def async_setup_entry(
|
||||
class DeconzAlarmControlPanel(DeconzDevice[AncillaryControl], AlarmControlPanelEntity):
|
||||
"""Representation of a deCONZ alarm control panel."""
|
||||
|
||||
_update_key = "panel"
|
||||
TYPE = DOMAIN
|
||||
|
||||
_attr_code_format = CodeFormat.NUMBER
|
||||
@@ -105,11 +106,7 @@ class DeconzAlarmControlPanel(DeconzDevice[AncillaryControl], AlarmControlPanelE
|
||||
@callback
|
||||
def async_update_callback(self) -> None:
|
||||
"""Update the control panels state."""
|
||||
keys = {"panel", "reachable"}
|
||||
if (
|
||||
self._device.changed_keys.intersection(keys)
|
||||
and self._device.panel in DECONZ_TO_ALARM_STATE
|
||||
):
|
||||
if self._device.panel in DECONZ_TO_ALARM_STATE:
|
||||
super().async_update_callback()
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user