Add alias to DOMAIN import in deconz (#125568)

This commit is contained in:
epenet
2024-09-09 19:27:06 +02:00
committed by GitHub
parent c5453835c2
commit e0a221ba1f
14 changed files with 50 additions and 46 deletions

View File

@@ -18,7 +18,7 @@ from pydeconz.models.sensor.vibration import Vibration
from pydeconz.models.sensor.water import Water
from homeassistant.components.binary_sensor import (
DOMAIN,
DOMAIN as BINARY_SENSOR_DOMAIN,
BinarySensorDeviceClass,
BinarySensorEntity,
BinarySensorEntityDescription,
@@ -165,7 +165,7 @@ async def async_setup_entry(
) -> None:
"""Set up the deCONZ binary sensor."""
hub = DeconzHub.get_hub(hass, config_entry)
hub.entities[DOMAIN] = set()
hub.entities[BINARY_SENSOR_DOMAIN] = set()
@callback
def async_add_sensor(_: EventType, sensor_id: str) -> None:
@@ -189,7 +189,7 @@ async def async_setup_entry(
class DeconzBinarySensor(DeconzDevice[SensorResources], BinarySensorEntity):
"""Representation of a deCONZ binary sensor."""
TYPE = DOMAIN
TYPE = BINARY_SENSOR_DOMAIN
entity_description: DeconzBinarySensorDescription
def __init__(