Fix sync api use in alarm control panel test (#48725)

This commit is contained in:
Martin Hjelmare 2021-04-06 16:50:15 +02:00 committed by GitHub
parent 46b673cdc6
commit ae67f300b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()