Skip to content

Commit

Permalink
fix internal changes in disarm routine
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsfaber committed May 7, 2022
1 parent 88cc43e commit ebfea44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/alarmo/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ async def async_handle_event(event: str, area_id: str, args: dict = {}):
)
if event == const.EVENT_TRIGGER_TIME_EXPIRED:
if self.hass.data[const.DOMAIN]["areas"][area_id].state == STATE_ALARM_DISARMED:
await self.async_alarm_disarm(None, True)
await self.async_alarm_disarm(skip_code=True)

async_dispatcher_connect(self.hass, "alarmo_event", async_handle_event)

Expand Down Expand Up @@ -961,10 +961,10 @@ async def async_alarm_disarm(self, **kwargs):
context_id = kwargs.get("context_id", None)

"""Send disarm command."""
res = await super().async_alarm_disarm(code, skip_code)
res = await super().async_alarm_disarm(code=code, skip_code=skip_code)
if res:
for item in self.hass.data[const.DOMAIN]["areas"].values():
await item.async_alarm_disarm(code, skip_code)
await item.async_alarm_disarm(code=code, skip_code=skip_code)

async_dispatcher_send(self.hass, "alarmo_event", const.EVENT_DISARM, self.area_id, {
const.ATTR_CONTEXT_ID: context_id
Expand Down

0 comments on commit ebfea44

Please sign in to comment.