Skip to content

Commit

Permalink
alarm_state property
Browse files Browse the repository at this point in the history
  • Loading branch information
JoDehli committed Nov 10, 2024
1 parent b470f04 commit c065777
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/loxone/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ async def async_alarm_arm_away(self, code=None):
self.async_schedule_update_ha_state()

@property
def state(self):
"""Return the state of the entity."""
def alarm_state(self) -> AlarmControlPanelState | None:
"""Return the state of the device."""
if self._level >= 1.0:
return AlarmControlPanelState.TRIGGERED
if self._armed_delay or self._armed_at:
Expand All @@ -226,6 +226,7 @@ def state(self):
return AlarmControlPanelState.ARMED_AWAY
return AlarmControlPanelState.DISARMED


@property
def extra_state_attributes(self):
"""Return the state attributes."""
Expand Down

0 comments on commit c065777

Please sign in to comment.