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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user