Avoid importing counter and proximity integrations in logbook (#112528)
parent
675b1a392b
commit
581a4f82b2
|
@ -2,14 +2,17 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from homeassistant.components.automation import EVENT_AUTOMATION_TRIGGERED
|
from homeassistant.components.automation import EVENT_AUTOMATION_TRIGGERED
|
||||||
from homeassistant.components.counter import DOMAIN as COUNTER_DOMAIN
|
|
||||||
from homeassistant.components.proximity import DOMAIN as PROXIMITY_DOMAIN
|
|
||||||
from homeassistant.components.script import EVENT_SCRIPT_STARTED
|
from homeassistant.components.script import EVENT_SCRIPT_STARTED
|
||||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||||
from homeassistant.const import EVENT_CALL_SERVICE, EVENT_LOGBOOK_ENTRY
|
from homeassistant.const import EVENT_CALL_SERVICE, EVENT_LOGBOOK_ENTRY
|
||||||
|
|
||||||
|
#
|
||||||
# Domains that are always continuous
|
# Domains that are always continuous
|
||||||
ALWAYS_CONTINUOUS_DOMAINS = {COUNTER_DOMAIN, PROXIMITY_DOMAIN}
|
#
|
||||||
|
# These are hard coded here to avoid importing
|
||||||
|
# the entire counter and proximity integrations
|
||||||
|
# to get the name of the domain.
|
||||||
|
ALWAYS_CONTINUOUS_DOMAINS = {"counter", "proximity"}
|
||||||
|
|
||||||
# Domains that are continuous if there is a UOM set on the entity
|
# Domains that are continuous if there is a UOM set on the entity
|
||||||
CONDITIONALLY_CONTINUOUS_DOMAINS = {SENSOR_DOMAIN}
|
CONDITIONALLY_CONTINUOUS_DOMAINS = {SENSOR_DOMAIN}
|
||||||
|
|
Loading…
Reference in New Issue