You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncdefhass_started(event: HAEvent) ->None:
_LOGGER.debug("adding state changed listener and starting global contexts")
awaitState.get_service_params()
hass.data[DOMAIN][UNSUB_LISTENERS].append(hass.bus.async_listen(EVENT_STATE_CHANGED, state_changed))
start_global_contexts()
The state_changed listener is only setup upon hass_started.
When disabling pyscript, the listener is removed. When re-enabling it, the listener is never re-added.