mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00: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:
parent
546fc1e282
commit
85ec48ff31
@ -7,6 +7,11 @@ import logging
|
|||||||
from aiohttp.client_exceptions import ServerDisconnectedError
|
from aiohttp.client_exceptions import ServerDisconnectedError
|
||||||
from pyunifiprotect.exceptions import ClientError, NotAuthorized
|
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.config_entries import ConfigEntry
|
||||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
Loading…
x
Reference in New Issue
Block a user