mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-22 00:26:29 +00:00
Don't notify listeners on CoreState.CLOSE (#4506)
This commit is contained in:
parent
1eb95b4d33
commit
a79fa14ee7
@ -70,13 +70,16 @@ class Core(CoreSysAttributes):
|
|||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
self._state = new_state
|
self._state = new_state
|
||||||
self.sys_bus.fire_event(BusEvent.SUPERVISOR_STATE_CHANGE, new_state)
|
|
||||||
|
|
||||||
# These will be received by HA after startup has completed which won't make sense
|
# Don't attempt to notify anyone on CLOSE as we're about to stop the event loop
|
||||||
if new_state not in STARTING_STATES:
|
if new_state != CoreState.CLOSE:
|
||||||
self.sys_homeassistant.websocket.supervisor_update_event(
|
self.sys_bus.fire_event(BusEvent.SUPERVISOR_STATE_CHANGE, new_state)
|
||||||
"info", {"state": new_state}
|
|
||||||
)
|
# These will be received by HA after startup has completed which won't make sense
|
||||||
|
if new_state not in STARTING_STATES:
|
||||||
|
self.sys_homeassistant.websocket.supervisor_update_event(
|
||||||
|
"info", {"state": new_state}
|
||||||
|
)
|
||||||
|
|
||||||
async def connect(self):
|
async def connect(self):
|
||||||
"""Connect Supervisor container."""
|
"""Connect Supervisor container."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user