Use config_entry.on_unload rather than local listener implementation in UniFi (#49496)

This commit is contained in:
Robert Svensson
2021-04-20 20:50:42 +02:00
committed by GitHub
parent 138226fa14
commit 63616a9e36
5 changed files with 9 additions and 11 deletions

View File

@@ -101,7 +101,6 @@ class UniFiController:
self.progress = None
self.wireless_clients = None
self.listeners = []
self.site_id: str = ""
self._site_name = None
self._site_role = None
@@ -466,10 +465,6 @@ class UniFiController:
if not unload_ok:
return False
for unsub_dispatcher in self.listeners:
unsub_dispatcher()
self.listeners = []
if self._cancel_heartbeat_check:
self._cancel_heartbeat_check()
self._cancel_heartbeat_check = None