Skip to content

Commit

Permalink
Update alarm_control_panel.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jerhaag committed Dec 25, 2024
1 parent c6094df commit fc2d0d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/tc20e/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ def extra_state_attributes(self) -> dict:
"display_name": self._displayname,
}

async def async_alarm_disarm(self) -> None:
async def async_alarm_disarm(self, code=None) -> None:
"""Disarm alarm."""
command = "disarm"
await self.coordinator.setalarm(command)
if alarm_state := self.coordinator.alarmstatus:
self._attr_state = ALARM_STATE_TO_HA_STATE[alarm_state]
self.async_write_ha_state()

async def async_alarm_arm_away(self) -> None:
async def async_alarm_arm_away(self, code=None) -> None:
"""Arm alarm away."""
command = "full"
await self.coordinator.setalarm(command)
if alarm_state := self.coordinator.alarmstatus:
self._attr_state = ALARM_STATE_TO_HA_STATE[alarm_state]
self.async_write_ha_state()

async def async_alarm_arm_home(self) -> None:
async def async_alarm_arm_home(self, code=None) -> None:
"""Arm alarm away."""
command = "partial"
await self.coordinator.setalarm(command)
Expand Down

0 comments on commit fc2d0d9

Please sign in to comment.