Fix unifiprotect delaying shutdown if websocket if offline (#116331)
This commit is contained in:
parent
3f0c0a72db
commit
ce42ad187c
1 changed files with 6 additions and 1 deletions
|
@ -269,7 +269,12 @@ class ProtectData:
|
|||
this will be a no-op. If the websocket is disconnected,
|
||||
this will trigger a reconnect and refresh.
|
||||
"""
|
||||
self._hass.async_create_task(self.async_refresh(), eager_start=True)
|
||||
self._entry.async_create_background_task(
|
||||
self._hass,
|
||||
self.async_refresh(),
|
||||
name=f"{DOMAIN} {self._entry.title} refresh",
|
||||
eager_start=True,
|
||||
)
|
||||
|
||||
@callback
|
||||
def async_subscribe_device_id(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue