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:
parent
b12291633c
commit
4b7a313ece
31 changed files with 45 additions and 45 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue