mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Fix sync api use in alarm control panel test (#48725)
This commit is contained in:
parent
46b673cdc6
commit
ae67f300b2
@ -84,25 +84,25 @@ class MockAlarm(MockEntity, AlarmControlPanelEntity):
|
||||
def alarm_arm_away(self, code=None):
|
||||
"""Send arm away command."""
|
||||
self._state = STATE_ALARM_ARMED_AWAY
|
||||
self.async_write_ha_state()
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
def alarm_arm_home(self, code=None):
|
||||
"""Send arm home command."""
|
||||
self._state = STATE_ALARM_ARMED_HOME
|
||||
self.async_write_ha_state()
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
def alarm_arm_night(self, code=None):
|
||||
"""Send arm night command."""
|
||||
self._state = STATE_ALARM_ARMED_NIGHT
|
||||
self.async_write_ha_state()
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
def alarm_disarm(self, code=None):
|
||||
"""Send disarm command."""
|
||||
if code == "1234":
|
||||
self._state = STATE_ALARM_DISARMED
|
||||
self.async_write_ha_state()
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
def alarm_trigger(self, code=None):
|
||||
"""Send alarm trigger command."""
|
||||
self._state = STATE_ALARM_TRIGGERED
|
||||
self.async_write_ha_state()
|
||||
self.schedule_update_ha_state()
|
||||
|
Loading…
x
Reference in New Issue
Block a user