1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use identity checks for CoreState (#107846)

Some of the checks used ==, and some used is. Switch
everything to is as its faster
This commit is contained in:
J. Nick Koston
2024-01-11 23:21:26 -10:00
committed by GitHub
parent b12291633c
commit 4b7a313ece
31 changed files with 45 additions and 45 deletions

View File

@@ -721,7 +721,7 @@ class AutomationEntity(BaseAutomationEntity, RestoreEntity):
self._is_enabled = True
# HomeAssistant is starting up
if self.hass.state != CoreState.not_running:
if self.hass.state is not CoreState.not_running:
self._async_detach_triggers = await self._async_attach_triggers(False)
self.async_write_ha_state()
return