Add basic type hints to xiaomi_miio (#62889)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
de64622f3b
commit
cb135bc889
12 changed files with 102 additions and 24 deletions
|
@ -4,7 +4,10 @@ import logging
|
||||||
from miio import AirQualityMonitor, AirQualityMonitorCGDN1, DeviceException
|
from miio import AirQualityMonitor, AirQualityMonitorCGDN1, DeviceException
|
||||||
|
|
||||||
from homeassistant.components.air_quality import AirQualityEntity
|
from homeassistant.components.air_quality import AirQualityEntity
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_HOST, CONF_TOKEN
|
from homeassistant.const import CONF_HOST, CONF_TOKEN
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_DEVICE,
|
CONF_DEVICE,
|
||||||
|
@ -236,7 +239,11 @@ DEVICE_MAP = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Xiaomi Air Quality from a config entry."""
|
"""Set up the Xiaomi Air Quality from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"""Support for Xiomi Gateway alarm control panels."""
|
"""Support for Xiomi Gateway alarm control panels."""
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -9,12 +8,15 @@ from homeassistant.components.alarm_control_panel import (
|
||||||
SUPPORT_ALARM_ARM_AWAY,
|
SUPPORT_ALARM_ARM_AWAY,
|
||||||
AlarmControlPanelEntity,
|
AlarmControlPanelEntity,
|
||||||
)
|
)
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
STATE_ALARM_ARMED_AWAY,
|
STATE_ALARM_ARMED_AWAY,
|
||||||
STATE_ALARM_ARMING,
|
STATE_ALARM_ARMING,
|
||||||
STATE_ALARM_DISARMED,
|
STATE_ALARM_DISARMED,
|
||||||
)
|
)
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity import DeviceInfo
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import CONF_GATEWAY, DOMAIN
|
from .const import CONF_GATEWAY, DOMAIN
|
||||||
|
|
||||||
|
@ -25,7 +27,11 @@ XIAOMI_STATE_DISARMED_VALUE = "off"
|
||||||
XIAOMI_STATE_ARMING_VALUE = "oning"
|
XIAOMI_STATE_ARMING_VALUE = "oning"
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Xiaomi Gateway Alarm from a config entry."""
|
"""Set up the Xiaomi Gateway Alarm from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
gateway = hass.data[DOMAIN][config_entry.entry_id][CONF_GATEWAY]
|
gateway = hass.data[DOMAIN][config_entry.entry_id][CONF_GATEWAY]
|
||||||
|
|
|
@ -10,8 +10,10 @@ from homeassistant.components.binary_sensor import (
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
BinarySensorEntityDescription,
|
BinarySensorEntityDescription,
|
||||||
)
|
)
|
||||||
from homeassistant.core import callback
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from . import VacuumCoordinatorDataAttributes
|
from . import VacuumCoordinatorDataAttributes
|
||||||
from .const import (
|
from .const import (
|
||||||
|
@ -158,7 +160,11 @@ def _setup_vacuum_sensors(hass, config_entry, async_add_entities):
|
||||||
async_add_entities(entities)
|
async_add_entities(entities)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Xiaomi sensor from a config entry."""
|
"""Set up the Xiaomi sensor from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,11 @@ from homeassistant.components.fan import (
|
||||||
SUPPORT_SET_SPEED,
|
SUPPORT_SET_SPEED,
|
||||||
FanEntity,
|
FanEntity,
|
||||||
)
|
)
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_ENTITY_ID
|
from homeassistant.const import ATTR_ENTITY_ID
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HomeAssistant, ServiceCall, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.util.percentage import (
|
from homeassistant.util.percentage import (
|
||||||
percentage_to_ranged_value,
|
percentage_to_ranged_value,
|
||||||
ranged_value_to_percentage,
|
ranged_value_to_percentage,
|
||||||
|
@ -172,7 +174,11 @@ FAN_DIRECTIONS_MAP = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Fan from a config entry."""
|
"""Set up the Fan from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
|
@ -222,7 +228,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||||
|
|
||||||
entities.append(entity)
|
entities.append(entity)
|
||||||
|
|
||||||
async def async_service_handler(service):
|
async def async_service_handler(service: ServiceCall) -> None:
|
||||||
"""Map services to methods on XiaomiAirPurifier."""
|
"""Map services to methods on XiaomiAirPurifier."""
|
||||||
method = SERVICE_TO_METHOD[service.service]
|
method = SERVICE_TO_METHOD[service.service]
|
||||||
params = {
|
params = {
|
||||||
|
|
|
@ -8,8 +8,10 @@ from miio.airhumidifier_mjjsq import OperationMode as AirhumidifierMjjsqOperatio
|
||||||
|
|
||||||
from homeassistant.components.humidifier import HumidifierDeviceClass, HumidifierEntity
|
from homeassistant.components.humidifier import HumidifierDeviceClass, HumidifierEntity
|
||||||
from homeassistant.components.humidifier.const import SUPPORT_MODES
|
from homeassistant.components.humidifier.const import SUPPORT_MODES
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_MODE
|
from homeassistant.const import ATTR_MODE
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.util.percentage import percentage_to_ranged_value
|
from homeassistant.util.percentage import percentage_to_ranged_value
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
|
@ -55,7 +57,11 @@ AVAILABLE_MODES_OTHER = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Humidifier from a config entry."""
|
"""Set up the Humidifier from a config entry."""
|
||||||
if not config_entry.data[CONF_FLOW_TYPE] == CONF_DEVICE:
|
if not config_entry.data[CONF_FLOW_TYPE] == CONF_DEVICE:
|
||||||
return
|
return
|
||||||
|
|
|
@ -24,9 +24,12 @@ from homeassistant.components.light import (
|
||||||
SUPPORT_COLOR_TEMP,
|
SUPPORT_COLOR_TEMP,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_ENTITY_ID, CONF_HOST, CONF_TOKEN
|
from homeassistant.const import ATTR_ENTITY_ID, CONF_HOST, CONF_TOKEN
|
||||||
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import DeviceInfo
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.util import color, dt
|
from homeassistant.util import color, dt
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
|
@ -109,7 +112,11 @@ SERVICE_TO_METHOD = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Xiaomi light from a config entry."""
|
"""Set up the Xiaomi light from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
|
@ -187,7 +194,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
async def async_service_handler(service):
|
async def async_service_handler(service: ServiceCall) -> None:
|
||||||
"""Map services to methods on Xiaomi Philips Lights."""
|
"""Map services to methods on Xiaomi Philips Lights."""
|
||||||
method = SERVICE_TO_METHOD.get(service.service)
|
method = SERVICE_TO_METHOD.get(service.service)
|
||||||
params = {
|
params = {
|
||||||
|
|
|
@ -4,9 +4,11 @@ from __future__ import annotations
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from homeassistant.components.number import NumberEntity, NumberEntityDescription
|
from homeassistant.components.number import NumberEntity, NumberEntityDescription
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import DEGREE, TIME_MINUTES
|
from homeassistant.const import DEGREE, TIME_MINUTES
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_DEVICE,
|
CONF_DEVICE,
|
||||||
|
@ -228,7 +230,11 @@ OSCILLATION_ANGLE_VALUES = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Selectors from a config entry."""
|
"""Set up the Selectors from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
if not config_entry.data[CONF_FLOW_TYPE] == CONF_DEVICE:
|
if not config_entry.data[CONF_FLOW_TYPE] == CONF_DEVICE:
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
"""Support for the Xiaomi IR Remote (Chuangmi IR)."""
|
"""Support for the Xiaomi IR Remote (Chuangmi IR)."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
@ -21,8 +23,11 @@ from homeassistant.const import (
|
||||||
CONF_TIMEOUT,
|
CONF_TIMEOUT,
|
||||||
CONF_TOKEN,
|
CONF_TOKEN,
|
||||||
)
|
)
|
||||||
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
from homeassistant.helpers import config_validation as cv, entity_platform
|
from homeassistant.helpers import config_validation as cv, entity_platform
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||||
from homeassistant.util.dt import utcnow
|
from homeassistant.util.dt import utcnow
|
||||||
|
|
||||||
from .const import SERVICE_LEARN, SERVICE_SET_REMOTE_LED_OFF, SERVICE_SET_REMOTE_LED_ON
|
from .const import SERVICE_LEARN, SERVICE_SET_REMOTE_LED_OFF, SERVICE_SET_REMOTE_LED_ON
|
||||||
|
@ -58,7 +63,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config: ConfigType,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
discovery_info: DiscoveryInfoType | None = None,
|
||||||
|
) -> None:
|
||||||
"""Set up the Xiaomi IR Remote (Chuangmi IR) platform."""
|
"""Set up the Xiaomi IR Remote (Chuangmi IR) platform."""
|
||||||
host = config[CONF_HOST]
|
host = config[CONF_HOST]
|
||||||
token = config[CONF_TOKEN]
|
token = config[CONF_TOKEN]
|
||||||
|
|
|
@ -11,8 +11,10 @@ from miio.airpurifier_miot import LedBrightness as AirpurifierMiotLedBrightness
|
||||||
from miio.fan import LedBrightness as FanLedBrightness
|
from miio.fan import LedBrightness as FanLedBrightness
|
||||||
|
|
||||||
from homeassistant.components.select import SelectEntity, SelectEntityDescription
|
from homeassistant.components.select import SelectEntity, SelectEntityDescription
|
||||||
from homeassistant.core import callback
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_DEVICE,
|
CONF_DEVICE,
|
||||||
|
@ -68,7 +70,11 @@ SELECTOR_TYPES = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Selectors from a config entry."""
|
"""Set up the Selectors from a config entry."""
|
||||||
if not config_entry.data[CONF_FLOW_TYPE] == CONF_DEVICE:
|
if not config_entry.data[CONF_FLOW_TYPE] == CONF_DEVICE:
|
||||||
return
|
return
|
||||||
|
|
|
@ -20,6 +20,7 @@ from homeassistant.components.sensor import (
|
||||||
SensorEntityDescription,
|
SensorEntityDescription,
|
||||||
SensorStateClass,
|
SensorStateClass,
|
||||||
)
|
)
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
AREA_SQUARE_METERS,
|
AREA_SQUARE_METERS,
|
||||||
ATTR_BATTERY_LEVEL,
|
ATTR_BATTERY_LEVEL,
|
||||||
|
@ -37,8 +38,9 @@ from homeassistant.const import (
|
||||||
TIME_SECONDS,
|
TIME_SECONDS,
|
||||||
VOLUME_CUBIC_METERS,
|
VOLUME_CUBIC_METERS,
|
||||||
)
|
)
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
from . import VacuumCoordinatorDataAttributes
|
from . import VacuumCoordinatorDataAttributes
|
||||||
|
@ -550,7 +552,11 @@ def _setup_vacuum_sensors(hass, config_entry, async_add_entities):
|
||||||
async_add_entities(entities)
|
async_add_entities(entities)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Xiaomi sensor from a config entry."""
|
"""Set up the Xiaomi sensor from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ from homeassistant.components.switch import (
|
||||||
SwitchEntity,
|
SwitchEntity,
|
||||||
SwitchEntityDescription,
|
SwitchEntityDescription,
|
||||||
)
|
)
|
||||||
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
ATTR_MODE,
|
ATTR_MODE,
|
||||||
|
@ -22,9 +23,10 @@ from homeassistant.const import (
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
CONF_TOKEN,
|
CONF_TOKEN,
|
||||||
)
|
)
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HomeAssistant, ServiceCall, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_DEVICE,
|
CONF_DEVICE,
|
||||||
|
@ -274,7 +276,11 @@ SWITCH_TYPES = (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the switch from a config entry."""
|
"""Set up the switch from a config entry."""
|
||||||
model = config_entry.data[CONF_MODEL]
|
model = config_entry.data[CONF_MODEL]
|
||||||
if model in (*MODELS_HUMIDIFIER, *MODELS_FAN):
|
if model in (*MODELS_HUMIDIFIER, *MODELS_FAN):
|
||||||
|
@ -405,7 +411,7 @@ async def async_setup_other_entry(hass, config_entry, async_add_entities):
|
||||||
model,
|
model,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_service_handler(service):
|
async def async_service_handler(service: ServiceCall) -> None:
|
||||||
"""Map services to methods on XiaomiPlugGenericSwitch."""
|
"""Map services to methods on XiaomiPlugGenericSwitch."""
|
||||||
method = SERVICE_TO_METHOD.get(service.service)
|
method = SERVICE_TO_METHOD.get(service.service)
|
||||||
params = {
|
params = {
|
||||||
|
|
|
@ -26,8 +26,10 @@ from homeassistant.components.vacuum import (
|
||||||
SUPPORT_STOP,
|
SUPPORT_STOP,
|
||||||
StateVacuumEntity,
|
StateVacuumEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.core import callback
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers import config_validation as cv, entity_platform
|
from homeassistant.helpers import config_validation as cv, entity_platform
|
||||||
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.util.dt import as_utc
|
from homeassistant.util.dt import as_utc
|
||||||
|
|
||||||
from . import VacuumCoordinatorData
|
from . import VacuumCoordinatorData
|
||||||
|
@ -98,7 +100,11 @@ STATE_CODE_TO_STATE = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
config_entry: ConfigEntry,
|
||||||
|
async_add_entities: AddEntitiesCallback,
|
||||||
|
) -> None:
|
||||||
"""Set up the Xiaomi vacuum cleaner robot from a config entry."""
|
"""Set up the Xiaomi vacuum cleaner robot from a config entry."""
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue