mirror of
https://github.com/home-assistant/core.git
synced 2026-09-14 18:25:47 -05:00
Import anonymize_data in unifiprotect init to avoid it being imported in the event loop (#112052)
Improve anonymize_data in unifiprotect init to avoid it being imported in the event loop
This commit is contained in:
committed by
Paulus Schoutsen
parent
a4353cf39d
commit
1bcdba1b4b
@@ -7,6 +7,11 @@ import logging
|
||||
from aiohttp.client_exceptions import ServerDisconnectedError
|
||||
from pyunifiprotect.exceptions import ClientError, NotAuthorized
|
||||
|
||||
# Import the test_util.anonymize module from the pyunifiprotect package
|
||||
# in __init__ to ensure it gets imported in the executor since the
|
||||
# diagnostics module will not be imported in the executor.
|
||||
from pyunifiprotect.test_util.anonymize import anonymize_data # noqa: F401
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
Reference in New Issue
Block a user