Replace async_schedule_update_ha_state for manual and manual_mqtt (#84395)

Replace deprecated async_schedule_update_ha_state
This commit is contained in:
Jan Bouwhuis 2022-12-22 08:48:33 +01:00 committed by GitHub
parent b8ce10f9a1
commit df58b5d9bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -291,7 +291,7 @@ class ManualAlarm(alarm.AlarmControlPanelEntity, RestoreEntity):
self._state = STATE_ALARM_DISARMED
self._state_ts = dt_util.utcnow()
self.async_schedule_update_ha_state()
self.async_write_ha_state()
async def async_alarm_arm_home(self, code: str | None = None) -> None:
"""Send arm home command."""
@ -357,7 +357,7 @@ class ManualAlarm(alarm.AlarmControlPanelEntity, RestoreEntity):
self._previous_state = self._state
self._state = state
self._state_ts = dt_util.utcnow()
self.async_schedule_update_ha_state()
self.async_write_ha_state()
self._async_set_state_update_events()
def _async_set_state_update_events(self) -> None:

View File

@ -369,7 +369,7 @@ class ManualMQTTAlarm(alarm.AlarmControlPanelEntity):
self._previous_state = self._state
self._state = state
self._state_ts = dt_util.utcnow()
self.async_schedule_update_ha_state()
self.async_write_ha_state()
pending_time = self._pending_time(state)
if state == STATE_ALARM_TRIGGERED: