Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.xiaomi_miio Namespace Reference

Namespaces

 air_quality
 
 alarm_control_panel
 
 binary_sensor
 
 button
 
 config_flow
 
 const
 
 device
 
 device_tracker
 
 diagnostics
 
 entity
 
 fan
 
 gateway
 
 humidifier
 
 light
 
 number
 
 remote
 
 select
 
 sensor
 
 switch
 
 typing
 
 vacuum
 

Classes

class  VacuumCoordinatorData
 
class  VacuumCoordinatorDataAttributes
 

Functions

def _async_update_data_default (hass, device)
 
Callable[[], Coroutine[Any, Any, VacuumCoordinatorData]] _async_update_data_vacuum (HomeAssistant hass, RoborockVacuum device)
 
None async_create_miio_device_and_coordinator (HomeAssistant hass, ConfigEntry entry)
 
bool async_setup_device_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
None async_setup_gateway_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry config_entry)
 
def get_platforms (config_entry)
 
None update_listener (HomeAssistant hass, ConfigEntry config_entry)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
list AIR_MONITOR_PLATFORMS = [Platform.AIR_QUALITY, Platform.SENSOR]
 
list FAN_PLATFORMS
 
list GATEWAY_PLATFORMS
 
list HUMIDIFIER_PLATFORMS
 
list LIGHT_PLATFORMS = [Platform.LIGHT]
 
dictionary MODEL_TO_CLASS_MAP
 
int POLLING_TIMEOUT_SEC = 10
 
list SWITCH_PLATFORMS = [Platform.SWITCH]
 
 UPDATE_INTERVAL = timedelta(seconds=15)
 
list VACUUM_PLATFORMS
 

Detailed Description

Support for Xiaomi Miio.

Function Documentation

◆ _async_update_data_default()

def homeassistant.components.xiaomi_miio._async_update_data_default (   hass,
  device 
)
private

Definition at line 175 of file __init__.py.

◆ _async_update_data_vacuum()

Callable[[], Coroutine[Any, Any, VacuumCoordinatorData]] homeassistant.components.xiaomi_miio._async_update_data_vacuum ( HomeAssistant  hass,
RoborockVacuum   device 
)
private

Definition at line 238 of file __init__.py.

◆ async_create_miio_device_and_coordinator()

None homeassistant.components.xiaomi_miio.async_create_miio_device_and_coordinator ( HomeAssistant  hass,
ConfigEntry   entry 
)
Set up a data coordinator and one miio device to service multiple entities.

Definition at line 293 of file __init__.py.

◆ async_setup_device_entry()

bool homeassistant.components.xiaomi_miio.async_setup_device_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up the Xiaomi Miio device component from a config entry.

Definition at line 474 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.xiaomi_miio.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up the Xiaomi Miio components from a config entry.

Definition at line 128 of file __init__.py.

◆ async_setup_gateway_entry()

None homeassistant.components.xiaomi_miio.async_setup_gateway_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up the Xiaomi Gateway component from a config entry.

Definition at line 406 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.xiaomi_miio.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  config_entry 
)
Unload a config entry.

Definition at line 489 of file __init__.py.

◆ get_platforms()

def homeassistant.components.xiaomi_miio.get_platforms (   config_entry)
Return the platforms belonging to a config_entry.

Definition at line 142 of file __init__.py.

◆ update_listener()

None homeassistant.components.xiaomi_miio.update_listener ( HomeAssistant  hass,
ConfigEntry  config_entry 
)
Handle options update.

Definition at line 503 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.xiaomi_miio._LOGGER = logging.getLogger(__name__)
private

Definition at line 79 of file __init__.py.

◆ AIR_MONITOR_PLATFORMS

list homeassistant.components.xiaomi_miio.AIR_MONITOR_PLATFORMS = [Platform.AIR_QUALITY, Platform.SENSOR]

Definition at line 115 of file __init__.py.

◆ FAN_PLATFORMS

list homeassistant.components.xiaomi_miio.FAN_PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.BUTTON,
4  Platform.FAN,
5  Platform.NUMBER,
6  Platform.SELECT,
7  Platform.SENSOR,
8  Platform.SWITCH,
9 ]

Definition at line 91 of file __init__.py.

◆ GATEWAY_PLATFORMS

list homeassistant.components.xiaomi_miio.GATEWAY_PLATFORMS
Initial value:
1 = [
2  Platform.ALARM_CONTROL_PANEL,
3  Platform.LIGHT,
4  Platform.SENSOR,
5  Platform.SWITCH,
6 ]

Definition at line 84 of file __init__.py.

◆ HUMIDIFIER_PLATFORMS

list homeassistant.components.xiaomi_miio.HUMIDIFIER_PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.HUMIDIFIER,
4  Platform.NUMBER,
5  Platform.SELECT,
6  Platform.SENSOR,
7  Platform.SWITCH,
8 ]

Definition at line 100 of file __init__.py.

◆ LIGHT_PLATFORMS

list homeassistant.components.xiaomi_miio.LIGHT_PLATFORMS = [Platform.LIGHT]

Definition at line 108 of file __init__.py.

◆ MODEL_TO_CLASS_MAP

dictionary homeassistant.components.xiaomi_miio.MODEL_TO_CLASS_MAP
Initial value:
1 = {
2  MODEL_FAN_1C: Fan1C,
3  MODEL_FAN_P9: FanMiot,
4  MODEL_FAN_P10: FanMiot,
5  MODEL_FAN_P11: FanMiot,
6  MODEL_FAN_P18: FanMiot,
7  MODEL_FAN_P5: FanP5,
8  MODEL_FAN_ZA5: FanZA5,
9 }

Definition at line 117 of file __init__.py.

◆ POLLING_TIMEOUT_SEC

int homeassistant.components.xiaomi_miio.POLLING_TIMEOUT_SEC = 10

Definition at line 81 of file __init__.py.

◆ SWITCH_PLATFORMS

list homeassistant.components.xiaomi_miio.SWITCH_PLATFORMS = [Platform.SWITCH]

Definition at line 90 of file __init__.py.

◆ UPDATE_INTERVAL

homeassistant.components.xiaomi_miio.UPDATE_INTERVAL = timedelta(seconds=15)

Definition at line 82 of file __init__.py.

◆ VACUUM_PLATFORMS

list homeassistant.components.xiaomi_miio.VACUUM_PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.SENSOR,
4  Platform.BUTTON,
5  Platform.VACUUM,
6 ]

Definition at line 109 of file __init__.py.