mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 17:45:19 +02:00
Add alias to DOMAIN import (part 4)
This commit is contained in:
@@ -5,8 +5,8 @@ from __future__ import annotations
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from homeassistant.components.automation import DOMAIN as AUTOMATION_DOMAIN
|
||||||
from homeassistant.components.automation.config import (
|
from homeassistant.components.automation.config import (
|
||||||
DOMAIN,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
async_validate_config_item,
|
async_validate_config_item,
|
||||||
)
|
)
|
||||||
@@ -27,13 +27,15 @@ def async_setup(hass: HomeAssistant) -> bool:
|
|||||||
"""post_write_hook for Config View that reloads automations."""
|
"""post_write_hook for Config View that reloads automations."""
|
||||||
if action != ACTION_DELETE:
|
if action != ACTION_DELETE:
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
DOMAIN, SERVICE_RELOAD, {CONF_ID: config_key}
|
AUTOMATION_DOMAIN, SERVICE_RELOAD, {CONF_ID: config_key}
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
ent_reg = er.async_get(hass)
|
ent_reg = er.async_get(hass)
|
||||||
|
|
||||||
entity_id = ent_reg.async_get_entity_id(DOMAIN, DOMAIN, config_key)
|
entity_id = ent_reg.async_get_entity_id(
|
||||||
|
AUTOMATION_DOMAIN, AUTOMATION_DOMAIN, config_key
|
||||||
|
)
|
||||||
|
|
||||||
if entity_id is None:
|
if entity_id is None:
|
||||||
return
|
return
|
||||||
@@ -42,7 +44,7 @@ def async_setup(hass: HomeAssistant) -> bool:
|
|||||||
|
|
||||||
hass.http.register_view(
|
hass.http.register_view(
|
||||||
EditAutomationConfigView(
|
EditAutomationConfigView(
|
||||||
DOMAIN,
|
AUTOMATION_DOMAIN,
|
||||||
"config",
|
"config",
|
||||||
AUTOMATION_CONFIG_PATH,
|
AUTOMATION_CONFIG_PATH,
|
||||||
cv.string,
|
cv.string,
|
||||||
|
@@ -10,7 +10,7 @@ from pydeconz.models.sensor.ancillary_control import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from homeassistant.components.alarm_control_panel import (
|
from homeassistant.components.alarm_control_panel import (
|
||||||
DOMAIN,
|
DOMAIN as ALARM_CONTROL_PANEL_DOMAIN,
|
||||||
AlarmControlPanelEntity,
|
AlarmControlPanelEntity,
|
||||||
AlarmControlPanelEntityFeature,
|
AlarmControlPanelEntityFeature,
|
||||||
CodeFormat,
|
CodeFormat,
|
||||||
@@ -60,7 +60,7 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the deCONZ alarm control panel devices."""
|
"""Set up the deCONZ alarm control panel devices."""
|
||||||
hub = DeconzHub.get_hub(hass, config_entry)
|
hub = DeconzHub.get_hub(hass, config_entry)
|
||||||
hub.entities[DOMAIN] = set()
|
hub.entities[ALARM_CONTROL_PANEL_DOMAIN] = set()
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_add_sensor(_: EventType, sensor_id: str) -> None:
|
def async_add_sensor(_: EventType, sensor_id: str) -> None:
|
||||||
@@ -79,7 +79,7 @@ class DeconzAlarmControlPanel(DeconzDevice[AncillaryControl], AlarmControlPanelE
|
|||||||
"""Representation of a deCONZ alarm control panel."""
|
"""Representation of a deCONZ alarm control panel."""
|
||||||
|
|
||||||
_update_key = "panel"
|
_update_key = "panel"
|
||||||
TYPE = DOMAIN
|
TYPE = ALARM_CONTROL_PANEL_DOMAIN
|
||||||
|
|
||||||
_attr_code_format = CodeFormat.NUMBER
|
_attr_code_format = CodeFormat.NUMBER
|
||||||
_attr_supported_features = (
|
_attr_supported_features = (
|
||||||
|
@@ -18,7 +18,7 @@ from pydeconz.models.sensor.vibration import Vibration
|
|||||||
from pydeconz.models.sensor.water import Water
|
from pydeconz.models.sensor.water import Water
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DOMAIN,
|
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||||
BinarySensorDeviceClass,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
BinarySensorEntityDescription,
|
BinarySensorEntityDescription,
|
||||||
@@ -165,7 +165,7 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the deCONZ binary sensor."""
|
"""Set up the deCONZ binary sensor."""
|
||||||
hub = DeconzHub.get_hub(hass, config_entry)
|
hub = DeconzHub.get_hub(hass, config_entry)
|
||||||
hub.entities[DOMAIN] = set()
|
hub.entities[BINARY_SENSOR_DOMAIN] = set()
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_add_sensor(_: EventType, sensor_id: str) -> None:
|
def async_add_sensor(_: EventType, sensor_id: str) -> None:
|
||||||
@@ -189,7 +189,7 @@ async def async_setup_entry(
|
|||||||
class DeconzBinarySensor(DeconzDevice[SensorResources], BinarySensorEntity):
|
class DeconzBinarySensor(DeconzDevice[SensorResources], BinarySensorEntity):
|
||||||
"""Representation of a deCONZ binary sensor."""
|
"""Representation of a deCONZ binary sensor."""
|
||||||
|
|
||||||
TYPE = DOMAIN
|
TYPE = BINARY_SENSOR_DOMAIN
|
||||||
entity_description: DeconzBinarySensorDescription
|
entity_description: DeconzBinarySensorDescription
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@@ -12,7 +12,7 @@ from pydeconz.models.light.cover import Cover
|
|||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
DOMAIN,
|
DOMAIN as COVER_DOMAIN,
|
||||||
CoverDeviceClass,
|
CoverDeviceClass,
|
||||||
CoverEntity,
|
CoverEntity,
|
||||||
CoverEntityFeature,
|
CoverEntityFeature,
|
||||||
@@ -38,7 +38,7 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up covers for deCONZ component."""
|
"""Set up covers for deCONZ component."""
|
||||||
hub = DeconzHub.get_hub(hass, config_entry)
|
hub = DeconzHub.get_hub(hass, config_entry)
|
||||||
hub.entities[DOMAIN] = set()
|
hub.entities[COVER_DOMAIN] = set()
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_add_cover(_: EventType, cover_id: str) -> None:
|
def async_add_cover(_: EventType, cover_id: str) -> None:
|
||||||
@@ -54,7 +54,7 @@ async def async_setup_entry(
|
|||||||
class DeconzCover(DeconzDevice[Cover], CoverEntity):
|
class DeconzCover(DeconzDevice[Cover], CoverEntity):
|
||||||
"""Representation of a deCONZ cover."""
|
"""Representation of a deCONZ cover."""
|
||||||
|
|
||||||
TYPE = DOMAIN
|
TYPE = COVER_DOMAIN
|
||||||
|
|
||||||
def __init__(self, cover_id: str, hub: DeconzHub) -> None:
|
def __init__(self, cover_id: str, hub: DeconzHub) -> None:
|
||||||
"""Set up cover device."""
|
"""Set up cover device."""
|
||||||
|
@@ -11,7 +11,7 @@ from homeassistant.components.cover import (
|
|||||||
ATTR_CURRENT_TILT_POSITION,
|
ATTR_CURRENT_TILT_POSITION,
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
DOMAIN,
|
DOMAIN as COVER_DOMAIN,
|
||||||
PLATFORM_SCHEMA as COVER_PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA as COVER_PLATFORM_SCHEMA,
|
||||||
CoverEntity,
|
CoverEntity,
|
||||||
CoverEntityFeature,
|
CoverEntityFeature,
|
||||||
@@ -57,7 +57,7 @@ PARALLEL_UPDATES = 0
|
|||||||
|
|
||||||
PLATFORM_SCHEMA = COVER_PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA = COVER_PLATFORM_SCHEMA.extend(
|
||||||
{
|
{
|
||||||
vol.Required(CONF_ENTITIES): cv.entities_domain(DOMAIN),
|
vol.Required(CONF_ENTITIES): cv.entities_domain(COVER_DOMAIN),
|
||||||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
||||||
vol.Optional(CONF_UNIQUE_ID): cv.string,
|
vol.Optional(CONF_UNIQUE_ID): cv.string,
|
||||||
}
|
}
|
||||||
@@ -181,21 +181,25 @@ class CoverGroup(GroupEntity, CoverEntity):
|
|||||||
"""Move the covers up."""
|
"""Move the covers up."""
|
||||||
data = {ATTR_ENTITY_ID: self._covers[KEY_OPEN_CLOSE]}
|
data = {ATTR_ENTITY_ID: self._covers[KEY_OPEN_CLOSE]}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN, SERVICE_OPEN_COVER, data, blocking=True, context=self._context
|
COVER_DOMAIN, SERVICE_OPEN_COVER, data, blocking=True, context=self._context
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_close_cover(self, **kwargs: Any) -> None:
|
async def async_close_cover(self, **kwargs: Any) -> None:
|
||||||
"""Move the covers down."""
|
"""Move the covers down."""
|
||||||
data = {ATTR_ENTITY_ID: self._covers[KEY_OPEN_CLOSE]}
|
data = {ATTR_ENTITY_ID: self._covers[KEY_OPEN_CLOSE]}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN, SERVICE_CLOSE_COVER, data, blocking=True, context=self._context
|
COVER_DOMAIN,
|
||||||
|
SERVICE_CLOSE_COVER,
|
||||||
|
data,
|
||||||
|
blocking=True,
|
||||||
|
context=self._context,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_stop_cover(self, **kwargs: Any) -> None:
|
async def async_stop_cover(self, **kwargs: Any) -> None:
|
||||||
"""Fire the stop action."""
|
"""Fire the stop action."""
|
||||||
data = {ATTR_ENTITY_ID: self._covers[KEY_STOP]}
|
data = {ATTR_ENTITY_ID: self._covers[KEY_STOP]}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN, SERVICE_STOP_COVER, data, blocking=True, context=self._context
|
COVER_DOMAIN, SERVICE_STOP_COVER, data, blocking=True, context=self._context
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_set_cover_position(self, **kwargs: Any) -> None:
|
async def async_set_cover_position(self, **kwargs: Any) -> None:
|
||||||
@@ -205,7 +209,7 @@ class CoverGroup(GroupEntity, CoverEntity):
|
|||||||
ATTR_POSITION: kwargs[ATTR_POSITION],
|
ATTR_POSITION: kwargs[ATTR_POSITION],
|
||||||
}
|
}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN,
|
COVER_DOMAIN,
|
||||||
SERVICE_SET_COVER_POSITION,
|
SERVICE_SET_COVER_POSITION,
|
||||||
data,
|
data,
|
||||||
blocking=True,
|
blocking=True,
|
||||||
@@ -216,21 +220,33 @@ class CoverGroup(GroupEntity, CoverEntity):
|
|||||||
"""Tilt covers open."""
|
"""Tilt covers open."""
|
||||||
data = {ATTR_ENTITY_ID: self._tilts[KEY_OPEN_CLOSE]}
|
data = {ATTR_ENTITY_ID: self._tilts[KEY_OPEN_CLOSE]}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN, SERVICE_OPEN_COVER_TILT, data, blocking=True, context=self._context
|
COVER_DOMAIN,
|
||||||
|
SERVICE_OPEN_COVER_TILT,
|
||||||
|
data,
|
||||||
|
blocking=True,
|
||||||
|
context=self._context,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_close_cover_tilt(self, **kwargs: Any) -> None:
|
async def async_close_cover_tilt(self, **kwargs: Any) -> None:
|
||||||
"""Tilt covers closed."""
|
"""Tilt covers closed."""
|
||||||
data = {ATTR_ENTITY_ID: self._tilts[KEY_OPEN_CLOSE]}
|
data = {ATTR_ENTITY_ID: self._tilts[KEY_OPEN_CLOSE]}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN, SERVICE_CLOSE_COVER_TILT, data, blocking=True, context=self._context
|
COVER_DOMAIN,
|
||||||
|
SERVICE_CLOSE_COVER_TILT,
|
||||||
|
data,
|
||||||
|
blocking=True,
|
||||||
|
context=self._context,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_stop_cover_tilt(self, **kwargs: Any) -> None:
|
async def async_stop_cover_tilt(self, **kwargs: Any) -> None:
|
||||||
"""Stop cover tilt."""
|
"""Stop cover tilt."""
|
||||||
data = {ATTR_ENTITY_ID: self._tilts[KEY_STOP]}
|
data = {ATTR_ENTITY_ID: self._tilts[KEY_STOP]}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN, SERVICE_STOP_COVER_TILT, data, blocking=True, context=self._context
|
COVER_DOMAIN,
|
||||||
|
SERVICE_STOP_COVER_TILT,
|
||||||
|
data,
|
||||||
|
blocking=True,
|
||||||
|
context=self._context,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_set_cover_tilt_position(self, **kwargs: Any) -> None:
|
async def async_set_cover_tilt_position(self, **kwargs: Any) -> None:
|
||||||
@@ -240,7 +256,7 @@ class CoverGroup(GroupEntity, CoverEntity):
|
|||||||
ATTR_TILT_POSITION: kwargs[ATTR_TILT_POSITION],
|
ATTR_TILT_POSITION: kwargs[ATTR_TILT_POSITION],
|
||||||
}
|
}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
DOMAIN,
|
COVER_DOMAIN,
|
||||||
SERVICE_SET_COVER_TILT_POSITION,
|
SERVICE_SET_COVER_TILT_POSITION,
|
||||||
data,
|
data,
|
||||||
blocking=True,
|
blocking=True,
|
||||||
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|||||||
from iaqualink.device import AqualinkBinarySensor
|
from iaqualink.device import AqualinkBinarySensor
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DOMAIN,
|
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||||
BinarySensorDeviceClass,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
@@ -26,7 +26,10 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up discovered binary sensors."""
|
"""Set up discovered binary sensors."""
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
(HassAqualinkBinarySensor(dev) for dev in hass.data[AQUALINK_DOMAIN][DOMAIN]),
|
(
|
||||||
|
HassAqualinkBinarySensor(dev)
|
||||||
|
for dev in hass.data[AQUALINK_DOMAIN][BINARY_SENSOR_DOMAIN]
|
||||||
|
),
|
||||||
True,
|
True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ from typing import Any
|
|||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
DOMAIN,
|
DOMAIN as COVER_DOMAIN,
|
||||||
CoverDeviceClass,
|
CoverDeviceClass,
|
||||||
CoverEntity,
|
CoverEntity,
|
||||||
CoverEntityFeature,
|
CoverEntityFeature,
|
||||||
@@ -122,7 +122,7 @@ async def async_setup_entry(
|
|||||||
"""
|
"""
|
||||||
data = config_entry.runtime_data
|
data = config_entry.runtime_data
|
||||||
bridge = data.bridge
|
bridge = data.bridge
|
||||||
cover_devices = bridge.get_devices_by_domain(DOMAIN)
|
cover_devices = bridge.get_devices_by_domain(COVER_DOMAIN)
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
# default to standard LutronCasetaCover type if the pylutron type is not yet mapped
|
# default to standard LutronCasetaCover type if the pylutron type is not yet mapped
|
||||||
PYLUTRON_TYPE_TO_CLASSES.get(cover_device["type"], LutronCasetaShade)(
|
PYLUTRON_TYPE_TO_CLASSES.get(cover_device["type"], LutronCasetaShade)(
|
||||||
|
@@ -5,7 +5,10 @@ from __future__ import annotations
|
|||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorEntity
|
from homeassistant.components.binary_sensor import (
|
||||||
|
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||||
|
BinarySensorEntity,
|
||||||
|
)
|
||||||
from homeassistant.components.http import KEY_HASS, HomeAssistantView
|
from homeassistant.components.http import KEY_HASS, HomeAssistantView
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
@@ -55,7 +58,7 @@ class MyStromView(HomeAssistantView):
|
|||||||
)
|
)
|
||||||
|
|
||||||
button_id = data[button_action]
|
button_id = data[button_action]
|
||||||
entity_id = f"{DOMAIN}.{button_id}_{button_action}"
|
entity_id = f"{BINARY_SENSOR_DOMAIN}.{button_id}_{button_action}"
|
||||||
if entity_id not in self.buttons:
|
if entity_id not in self.buttons:
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
"New myStrom button/action detected: %s/%s", button_id, button_action
|
"New myStrom button/action detected: %s/%s", button_id, button_action
|
||||||
|
@@ -6,7 +6,7 @@ from collections.abc import Callable
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from homeassistant.components.alarm_control_panel import (
|
from homeassistant.components.alarm_control_panel import (
|
||||||
DOMAIN,
|
DOMAIN as ALARM_CONTROL_PANEL_DOMAIN,
|
||||||
AlarmControlPanelEntity,
|
AlarmControlPanelEntity,
|
||||||
AlarmControlPanelEntityFeature,
|
AlarmControlPanelEntityFeature,
|
||||||
)
|
)
|
||||||
@@ -47,7 +47,9 @@ async def async_setup_entry(
|
|||||||
async_add_entities([MinutPointAlarmControl(client, home_id)], True)
|
async_add_entities([MinutPointAlarmControl(client, home_id)], True)
|
||||||
|
|
||||||
async_dispatcher_connect(
|
async_dispatcher_connect(
|
||||||
hass, POINT_DISCOVERY_NEW.format(DOMAIN, POINT_DOMAIN), async_discover_home
|
hass,
|
||||||
|
POINT_DISCOVERY_NEW.format(ALARM_CONTROL_PANEL_DOMAIN, POINT_DOMAIN),
|
||||||
|
async_discover_home,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@ import logging
|
|||||||
from pypoint import EVENTS
|
from pypoint import EVENTS
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DOMAIN,
|
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||||
BinarySensorDeviceClass,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
@@ -60,7 +60,9 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
|
|
||||||
async_dispatcher_connect(
|
async_dispatcher_connect(
|
||||||
hass, POINT_DISCOVERY_NEW.format(DOMAIN, POINT_DOMAIN), async_discover_sensor
|
hass,
|
||||||
|
POINT_DISCOVERY_NEW.format(BINARY_SENSOR_DOMAIN, POINT_DOMAIN),
|
||||||
|
async_discover_sensor,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ from screenlogicpy.const.msg import CODE
|
|||||||
from screenlogicpy.device_const.system import EQUIPMENT_FLAG
|
from screenlogicpy.device_const.system import EQUIPMENT_FLAG
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DOMAIN,
|
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||||
BinarySensorDeviceClass,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
BinarySensorEntityDescription,
|
BinarySensorEntityDescription,
|
||||||
@@ -202,7 +202,9 @@ async def async_setup_entry(
|
|||||||
chem_sensor_description.key,
|
chem_sensor_description.key,
|
||||||
)
|
)
|
||||||
if EQUIPMENT_FLAG.INTELLICHEM not in gateway.equipment_flags:
|
if EQUIPMENT_FLAG.INTELLICHEM not in gateway.equipment_flags:
|
||||||
cleanup_excluded_entity(coordinator, DOMAIN, chem_sensor_data_path)
|
cleanup_excluded_entity(
|
||||||
|
coordinator, BINARY_SENSOR_DOMAIN, chem_sensor_data_path
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
if gateway.get_data(*chem_sensor_data_path):
|
if gateway.get_data(*chem_sensor_data_path):
|
||||||
entities.append(
|
entities.append(
|
||||||
@@ -216,7 +218,9 @@ async def async_setup_entry(
|
|||||||
scg_sensor_description.key,
|
scg_sensor_description.key,
|
||||||
)
|
)
|
||||||
if EQUIPMENT_FLAG.CHLORINATOR not in gateway.equipment_flags:
|
if EQUIPMENT_FLAG.CHLORINATOR not in gateway.equipment_flags:
|
||||||
cleanup_excluded_entity(coordinator, DOMAIN, scg_sensor_data_path)
|
cleanup_excluded_entity(
|
||||||
|
coordinator, BINARY_SENSOR_DOMAIN, scg_sensor_data_path
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
if gateway.get_data(*scg_sensor_data_path):
|
if gateway.get_data(*scg_sensor_data_path):
|
||||||
entities.append(
|
entities.append(
|
||||||
|
Reference in New Issue
Block a user