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

Namespaces

 binary_sensor
 
 config_flow
 
 const
 
 cover
 
 entity
 
 light
 
 lock
 
 sensor
 
 switch
 

Functions

def _add_gateway_to_schema (hass, schema)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry config_entry)
 
bool setup (HomeAssistant hass, ConfigType config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_GW_MAC = "gw_mac"
 
string ATTR_RINGTONE_ID = "ringtone_id"
 
string ATTR_RINGTONE_VOL = "ringtone_vol"
 
 CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
 
list GATEWAY_PLATFORMS
 
list GATEWAY_PLATFORMS_NO_KEY = [Platform.BINARY_SENSOR, Platform.SENSOR]
 
string SERVICE_ADD_DEVICE = "add_device"
 
string SERVICE_PLAY_RINGTONE = "play_ringtone"
 
string SERVICE_REMOVE_DEVICE = "remove_device"
 
 SERVICE_SCHEMA_PLAY_RINGTONE
 
 SERVICE_SCHEMA_REMOVE_DEVICE
 
string SERVICE_STOP_RINGTONE = "stop_ringtone"
 

Detailed Description

Support for Xiaomi Gateways.

Function Documentation

◆ _add_gateway_to_schema()

def homeassistant.components.xiaomi_aqara._add_gateway_to_schema (   hass,
  schema 
)
private
Extend a voluptuous schema with a gateway validator.

Definition at line 237 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.xiaomi_aqara.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up the xiaomi aqara components from a config entry.

Definition at line 141 of file __init__.py.

◆ async_unload_entry()

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

Definition at line 207 of file __init__.py.

◆ setup()

bool homeassistant.components.xiaomi_aqara.setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the Xiaomi component.

Definition at line 75 of file __init__.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 36 of file __init__.py.

◆ ATTR_GW_MAC

string homeassistant.components.xiaomi_aqara.ATTR_GW_MAC = "gw_mac"

Definition at line 48 of file __init__.py.

◆ ATTR_RINGTONE_ID

string homeassistant.components.xiaomi_aqara.ATTR_RINGTONE_ID = "ringtone_id"

Definition at line 49 of file __init__.py.

◆ ATTR_RINGTONE_VOL

string homeassistant.components.xiaomi_aqara.ATTR_RINGTONE_VOL = "ringtone_vol"

Definition at line 50 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.xiaomi_aqara.CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)

Definition at line 72 of file __init__.py.

◆ GATEWAY_PLATFORMS

list homeassistant.components.xiaomi_aqara.GATEWAY_PLATFORMS
Initial value:
1 = [
2  Platform.BINARY_SENSOR,
3  Platform.COVER,
4  Platform.LIGHT,
5  Platform.LOCK,
6  Platform.SENSOR,
7  Platform.SWITCH,
8 ]

Definition at line 38 of file __init__.py.

◆ GATEWAY_PLATFORMS_NO_KEY

list homeassistant.components.xiaomi_aqara.GATEWAY_PLATFORMS_NO_KEY = [Platform.BINARY_SENSOR, Platform.SENSOR]

Definition at line 46 of file __init__.py.

◆ SERVICE_ADD_DEVICE

string homeassistant.components.xiaomi_aqara.SERVICE_ADD_DEVICE = "add_device"

Definition at line 54 of file __init__.py.

◆ SERVICE_PLAY_RINGTONE

string homeassistant.components.xiaomi_aqara.SERVICE_PLAY_RINGTONE = "play_ringtone"

Definition at line 52 of file __init__.py.

◆ SERVICE_REMOVE_DEVICE

string homeassistant.components.xiaomi_aqara.SERVICE_REMOVE_DEVICE = "remove_device"

Definition at line 55 of file __init__.py.

◆ SERVICE_SCHEMA_PLAY_RINGTONE

homeassistant.components.xiaomi_aqara.SERVICE_SCHEMA_PLAY_RINGTONE
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(ATTR_RINGTONE_ID): vol.All(
4  vol.Coerce(int), vol.NotIn([9, 14, 15, 16, 17, 18, 19])
5  ),
6  vol.Optional(ATTR_RINGTONE_VOL): vol.All(
7  vol.Coerce(int), vol.Clamp(min=0, max=100)
8  ),
9  }
10 )

Definition at line 57 of file __init__.py.

◆ SERVICE_SCHEMA_REMOVE_DEVICE

homeassistant.components.xiaomi_aqara.SERVICE_SCHEMA_REMOVE_DEVICE
Initial value:
1 = vol.Schema(
2  {vol.Required(ATTR_DEVICE_ID): vol.All(cv.string, vol.Length(min=14, max=14))}
3 )

Definition at line 68 of file __init__.py.

◆ SERVICE_STOP_RINGTONE

string homeassistant.components.xiaomi_aqara.SERVICE_STOP_RINGTONE = "stop_ringtone"

Definition at line 53 of file __init__.py.