mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Small speed ups to ambient_station (#114698)
This commit is contained in:
parent
3c76036c15
commit
06a752aa92
@ -93,7 +93,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||||
if unload_ok:
|
if unload_ok:
|
||||||
ambient = hass.data[DOMAIN].pop(entry.entry_id)
|
ambient = hass.data[DOMAIN].pop(entry.entry_id)
|
||||||
hass.async_create_task(ambient.ws_disconnect())
|
hass.async_create_task(ambient.ws_disconnect(), eager_start=True)
|
||||||
|
|
||||||
return unload_ok
|
return unload_ok
|
||||||
|
|
||||||
@ -179,7 +179,8 @@ class AmbientStation:
|
|||||||
self._hass.async_create_task(
|
self._hass.async_create_task(
|
||||||
self._hass.config_entries.async_forward_entry_setups(
|
self._hass.config_entries.async_forward_entry_setups(
|
||||||
self._entry, PLATFORMS
|
self._entry, PLATFORMS
|
||||||
)
|
),
|
||||||
|
eager_start=True,
|
||||||
)
|
)
|
||||||
self._entry_setup_complete = True
|
self._entry_setup_complete = True
|
||||||
self._ws_reconnect_delay = DEFAULT_SOCKET_MIN_RETRY
|
self._ws_reconnect_delay = DEFAULT_SOCKET_MIN_RETRY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user