mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Fix circular import loop in homeassistant/helpers/entity.py (#87780)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
2fae82a9ef
commit
8ccb3b7151
@ -12,7 +12,7 @@ import logging
|
|||||||
import math
|
import math
|
||||||
import sys
|
import sys
|
||||||
from timeit import default_timer as timer
|
from timeit import default_timer as timer
|
||||||
from typing import Any, Final, Literal, TypedDict, final
|
from typing import TYPE_CHECKING, Any, Final, Literal, TypedDict, final
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -40,10 +40,12 @@ from homeassistant.util import dt as dt_util, ensure_unique_string, slugify
|
|||||||
|
|
||||||
from . import device_registry as dr, entity_registry as er
|
from . import device_registry as dr, entity_registry as er
|
||||||
from .device_registry import DeviceEntryType
|
from .device_registry import DeviceEntryType
|
||||||
from .entity_platform import EntityPlatform
|
|
||||||
from .event import async_track_entity_registry_updated_event
|
from .event import async_track_entity_registry_updated_event
|
||||||
from .typing import StateType
|
from .typing import StateType
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from .entity_platform import EntityPlatform
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
SLOW_UPDATE_WARNING = 10
|
SLOW_UPDATE_WARNING = 10
|
||||||
DATA_ENTITY_SOURCE = "entity_info"
|
DATA_ENTITY_SOURCE = "entity_info"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user