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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 45 additions and 45 deletions

View file

@ -81,7 +81,7 @@ def async_at_started(
"""
def _is_started(hass: HomeAssistant) -> bool:
return hass.state == CoreState.running
return hass.state is CoreState.running
return _async_at_core_state(
hass, at_start_cb, EVENT_HOMEASSISTANT_STARTED, _is_started