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

Namespaces

 binary_sensor
 
 config_flow
 
 const
 
 device
 
 entity
 
 light
 
 scanner
 

Functions

YeelightDevice _async_get_device (HomeAssistant hass, str host, ConfigEntry entry)
 
None _async_initialize (HomeAssistant hass, ConfigEntry entry, YeelightDevice device)
 
None _async_normalize_config_entry (HomeAssistant hass, ConfigEntry entry)
 
None _async_update_listener (HomeAssistant hass, ConfigEntry entry)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 ATTR_ACTION
 
 ATTR_COUNT
 
 CONFIG_SCHEMA
 
 default
 
 DEVICE_SCHEMA
 
 VolDictType
 

Detailed Description

Support for Xiaomi Yeelight WiFi color bulb.

Function Documentation

◆ _async_get_device()

YeelightDevice homeassistant.components.yeelight._async_get_device ( HomeAssistant  hass,
str  host,
ConfigEntry   entry 
)
private

Definition at line 253 of file __init__.py.

◆ _async_initialize()

None homeassistant.components.yeelight._async_initialize ( HomeAssistant  hass,
ConfigEntry  entry,
YeelightDevice  device 
)
private
Initialize a Yeelight device.

Definition at line 142 of file __init__.py.

◆ _async_normalize_config_entry()

None homeassistant.components.yeelight._async_normalize_config_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
private
Move options from data for imported entries.

Initialize options with default values for other entries.

Copy the unique id to CONF_ID if it is missing

Definition at line 163 of file __init__.py.

◆ _async_update_listener()

None homeassistant.components.yeelight._async_update_listener ( HomeAssistant  hass,
ConfigEntry  entry 
)
private
Handle options update.

Definition at line 248 of file __init__.py.

◆ async_setup()

bool homeassistant.components.yeelight.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the Yeelight bulbs.

Definition at line 116 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.yeelight.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up Yeelight from a config entry.

Definition at line 206 of file __init__.py.

◆ async_unload_entry()

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

Definition at line 241 of file __init__.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 59 of file __init__.py.

◆ ATTR_ACTION

homeassistant.components.yeelight.ATTR_ACTION

Definition at line 64 of file __init__.py.

◆ ATTR_COUNT

homeassistant.components.yeelight.ATTR_COUNT

Definition at line 63 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.yeelight.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  DOMAIN: vol.Schema(
4  {
5  vol.Optional(CONF_DEVICES, default={}): {cv.string: DEVICE_SCHEMA},
6  vol.Optional(CONF_CUSTOM_EFFECTS): [
7  {
8  vol.Required(CONF_NAME): cv.string,
9  vol.Required(CONF_FLOW_PARAMS): YEELIGHT_FLOW_TRANSITION_SCHEMA,
10  }
11  ],
12  }
13  )
14  },
15  extra=vol.ALLOW_EXTRA,
16 )

Definition at line 98 of file __init__.py.

◆ default

homeassistant.components.yeelight.default

Definition at line 63 of file __init__.py.

◆ DEVICE_SCHEMA

homeassistant.components.yeelight.DEVICE_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
4  vol.Optional(CONF_TRANSITION, default=DEFAULT_TRANSITION): cv.positive_int,
5  vol.Optional(CONF_MODE_MUSIC, default=False): cv.boolean,
6  vol.Optional(CONF_SAVE_ON_CHANGE, default=False): cv.boolean,
7  vol.Optional(CONF_NIGHTLIGHT_SWITCH_TYPE): vol.Any(
8  NIGHTLIGHT_SWITCH_TYPE_LIGHT
9  ),
10  vol.Optional(CONF_MODEL): cv.string,
11  }
12 )

Definition at line 85 of file __init__.py.

◆ VolDictType

homeassistant.components.yeelight.VolDictType

Definition at line 62 of file __init__.py.