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

Classes

class  YeelightAmbientLight
 
class  YeelightBaseLight
 
class  YeelightColorLightSupport
 
class  YeelightColorLightWithNightlightSwitch
 
class  YeelightColorLightWithoutNightlightSwitch
 
class  YeelightColorLightWithoutNightlightSwitchLight
 
class  YeelightGenericLight
 
class  YeelightNightLightMode
 
class  YeelightNightLightModeWithAmbientSupport
 
class  YeelightNightLightModeWithoutBrightnessControl
 
class  YeelightNightLightSupport
 
class  YeelightWhiteTempLightSupport
 
class  YeelightWhiteTempWithoutNightlightSwitch
 
class  YeelightWithAmbientAndNightlight
 
class  YeelightWithAmbientWithoutNightlight
 
class  YeelightWithNightLight
 
class  YeelightWithoutNightlightSwitchMixIn
 

Functions

def _async_setup_services (HomeAssistant hass)
 
dict[str, dict[str, Any]] _parse_custom_effects (effects_config)
 
def _transitions_config_parser (transitions)
 
def _YeelightBaseLightT
 
None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_MINUTES = "minutes"
 
string EFFECT_ALARM = "Alarm"
 
string EFFECT_CANDLE_FLICKER = "Candle Flicker"
 
string EFFECT_CHRISTMAS = "Christmas"
 
string EFFECT_DATE_NIGHT = "Date Night"
 
string EFFECT_DISCO = "Disco"
 
string EFFECT_FACEBOOK = "Facebook"
 
string EFFECT_FAST_RANDOM_LOOP = "Fast Random Loop"
 
string EFFECT_HAPPY_BIRTHDAY = "Happy Birthday"
 
string EFFECT_HOME = "Home"
 
string EFFECT_LSD = "LSD"
 
string EFFECT_MOVIE = "Movie"
 
string EFFECT_NIGHT_MODE = "Night Mode"
 
string EFFECT_POLICE = "Police"
 
string EFFECT_POLICE2 = "Police2"
 
string EFFECT_RANDOM_LOOP = "Random Loop"
 
string EFFECT_RGB = "RGB"
 
string EFFECT_ROMANCE = "Romance"
 
string EFFECT_SLOWDOWN = "Slowdown"
 
string EFFECT_STOP = "Stop"
 
string EFFECT_STROBE = "Strobe epilepsy!"
 
string EFFECT_STROBE_COLOR = "Strobe color"
 
string EFFECT_SUNRISE = "Sunrise"
 
string EFFECT_SUNSET = "Sunset"
 
string EFFECT_TEA_TIME = "Tea Time"
 
string EFFECT_TEMP = "Slow Temp"
 
string EFFECT_TWITTER = "Twitter"
 
string EFFECT_WHATSAPP = "WhatsApp"
 
dictionary EFFECTS_MAP
 
 SERVICE_SCHEMA_SET_COLOR_FLOW_SCENE = YEELIGHT_FLOW_TRANSITION_SCHEMA
 
 SERVICE_SCHEMA_START_FLOW = YEELIGHT_FLOW_TRANSITION_SCHEMA
 
string SERVICE_SET_AUTO_DELAY_OFF_SCENE = "set_auto_delay_off_scene"
 
string SERVICE_SET_COLOR_FLOW_SCENE = "set_color_flow_scene"
 
string SERVICE_SET_COLOR_SCENE = "set_color_scene"
 
string SERVICE_SET_COLOR_TEMP_SCENE = "set_color_temp_scene"
 
string SERVICE_SET_HSV_SCENE = "set_hsv_scene"
 
string SERVICE_SET_MODE = "set_mode"
 
string SERVICE_SET_MUSIC_MODE = "set_music_mode"
 
string SERVICE_START_FLOW = "start_flow"
 
 VALID_BRIGHTNESS = vol.All(vol.Coerce(int), vol.Range(min=1, max=100))
 
 VolDictType
 
list YEELIGHT_COLOR_EFFECT_LIST
 
list YEELIGHT_MONO_EFFECT_LIST
 
list YEELIGHT_TEMP_ONLY_EFFECT_LIST = [EFFECT_TEMP, EFFECT_STOP]
 

Detailed Description

Light platform support for yeelight.

Function Documentation

◆ _async_setup_services()

def homeassistant.components.yeelight.light._async_setup_services ( HomeAssistant  hass)
private
Set up custom services.

Definition at line 337 of file light.py.

◆ _parse_custom_effects()

dict[str, dict[str, Any]] homeassistant.components.yeelight.light._parse_custom_effects (   effects_config)
private

Definition at line 227 of file light.py.

◆ _transitions_config_parser()

def homeassistant.components.yeelight.light._transitions_config_parser (   transitions)
private
Parse transitions config into initialized objects.

Definition at line 216 of file light.py.

◆ _YeelightBaseLightT()

def homeassistant.components.yeelight.light._YeelightBaseLightT
private

Definition at line 243 of file light.py.

◆ async_setup_entry()

None homeassistant.components.yeelight.light.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up Yeelight from a config entry.

Definition at line 283 of file light.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 71 of file light.py.

◆ ATTR_MINUTES

string homeassistant.components.yeelight.light.ATTR_MINUTES = "minutes"

Definition at line 73 of file light.py.

◆ EFFECT_ALARM

string homeassistant.components.yeelight.light.EFFECT_ALARM = "Alarm"

Definition at line 88 of file light.py.

◆ EFFECT_CANDLE_FLICKER

string homeassistant.components.yeelight.light.EFFECT_CANDLE_FLICKER = "Candle Flicker"

Definition at line 109 of file light.py.

◆ EFFECT_CHRISTMAS

string homeassistant.components.yeelight.light.EFFECT_CHRISTMAS = "Christmas"

Definition at line 91 of file light.py.

◆ EFFECT_DATE_NIGHT

string homeassistant.components.yeelight.light.EFFECT_DATE_NIGHT = "Date Night"

Definition at line 103 of file light.py.

◆ EFFECT_DISCO

string homeassistant.components.yeelight.light.EFFECT_DISCO = "Disco"

Definition at line 84 of file light.py.

◆ EFFECT_FACEBOOK

string homeassistant.components.yeelight.light.EFFECT_FACEBOOK = "Facebook"

Definition at line 98 of file light.py.

◆ EFFECT_FAST_RANDOM_LOOP

string homeassistant.components.yeelight.light.EFFECT_FAST_RANDOM_LOOP = "Fast Random Loop"

Definition at line 94 of file light.py.

◆ EFFECT_HAPPY_BIRTHDAY

string homeassistant.components.yeelight.light.EFFECT_HAPPY_BIRTHDAY = "Happy Birthday"

Definition at line 108 of file light.py.

◆ EFFECT_HOME

string homeassistant.components.yeelight.light.EFFECT_HOME = "Home"

Definition at line 101 of file light.py.

◆ EFFECT_LSD

string homeassistant.components.yeelight.light.EFFECT_LSD = "LSD"

Definition at line 95 of file light.py.

◆ EFFECT_MOVIE

string homeassistant.components.yeelight.light.EFFECT_MOVIE = "Movie"

Definition at line 104 of file light.py.

◆ EFFECT_NIGHT_MODE

string homeassistant.components.yeelight.light.EFFECT_NIGHT_MODE = "Night Mode"

Definition at line 102 of file light.py.

◆ EFFECT_POLICE

string homeassistant.components.yeelight.light.EFFECT_POLICE = "Police"

Definition at line 89 of file light.py.

◆ EFFECT_POLICE2

string homeassistant.components.yeelight.light.EFFECT_POLICE2 = "Police2"

Definition at line 90 of file light.py.

◆ EFFECT_RANDOM_LOOP

string homeassistant.components.yeelight.light.EFFECT_RANDOM_LOOP = "Random Loop"

Definition at line 93 of file light.py.

◆ EFFECT_RGB

string homeassistant.components.yeelight.light.EFFECT_RGB = "RGB"

Definition at line 92 of file light.py.

◆ EFFECT_ROMANCE

string homeassistant.components.yeelight.light.EFFECT_ROMANCE = "Romance"

Definition at line 107 of file light.py.

◆ EFFECT_SLOWDOWN

string homeassistant.components.yeelight.light.EFFECT_SLOWDOWN = "Slowdown"

Definition at line 96 of file light.py.

◆ EFFECT_STOP

string homeassistant.components.yeelight.light.EFFECT_STOP = "Stop"

Definition at line 100 of file light.py.

◆ EFFECT_STROBE

string homeassistant.components.yeelight.light.EFFECT_STROBE = "Strobe epilepsy!"

Definition at line 86 of file light.py.

◆ EFFECT_STROBE_COLOR

string homeassistant.components.yeelight.light.EFFECT_STROBE_COLOR = "Strobe color"

Definition at line 87 of file light.py.

◆ EFFECT_SUNRISE

string homeassistant.components.yeelight.light.EFFECT_SUNRISE = "Sunrise"

Definition at line 105 of file light.py.

◆ EFFECT_SUNSET

string homeassistant.components.yeelight.light.EFFECT_SUNSET = "Sunset"

Definition at line 106 of file light.py.

◆ EFFECT_TEA_TIME

string homeassistant.components.yeelight.light.EFFECT_TEA_TIME = "Tea Time"

Definition at line 110 of file light.py.

◆ EFFECT_TEMP

string homeassistant.components.yeelight.light.EFFECT_TEMP = "Slow Temp"

Definition at line 85 of file light.py.

◆ EFFECT_TWITTER

string homeassistant.components.yeelight.light.EFFECT_TWITTER = "Twitter"

Definition at line 99 of file light.py.

◆ EFFECT_WHATSAPP

string homeassistant.components.yeelight.light.EFFECT_WHATSAPP = "WhatsApp"

Definition at line 97 of file light.py.

◆ EFFECTS_MAP

dictionary homeassistant.components.yeelight.light.EFFECTS_MAP
Initial value:
1 = {
2  EFFECT_DISCO: flows.disco,
3  EFFECT_TEMP: flows.temp,
4  EFFECT_STROBE: flows.strobe,
5  EFFECT_STROBE_COLOR: flows.strobe_color,
6  EFFECT_ALARM: flows.alarm,
7  EFFECT_POLICE: flows.police,
8  EFFECT_POLICE2: flows.police2,
9  EFFECT_CHRISTMAS: flows.christmas,
10  EFFECT_RGB: flows.rgb,
11  EFFECT_RANDOM_LOOP: flows.random_loop,
12  EFFECT_LSD: flows.lsd,
13  EFFECT_SLOWDOWN: flows.slowdown,
14  EFFECT_HOME: flows.home,
15  EFFECT_NIGHT_MODE: flows.night_mode,
16  EFFECT_DATE_NIGHT: flows.date_night,
17  EFFECT_MOVIE: flows.movie,
18  EFFECT_SUNRISE: flows.sunrise,
19  EFFECT_SUNSET: flows.sunset,
20  EFFECT_ROMANCE: flows.romance,
21  EFFECT_HAPPY_BIRTHDAY: flows.happy_birthday,
22  EFFECT_CANDLE_FLICKER: flows.candle_flicker,
23  EFFECT_TEA_TIME: flows.tea_time,
24 }

Definition at line 147 of file light.py.

◆ SERVICE_SCHEMA_SET_COLOR_FLOW_SCENE

homeassistant.components.yeelight.light.SERVICE_SCHEMA_SET_COLOR_FLOW_SCENE = YEELIGHT_FLOW_TRANSITION_SCHEMA

Definition at line 207 of file light.py.

◆ SERVICE_SCHEMA_START_FLOW

homeassistant.components.yeelight.light.SERVICE_SCHEMA_START_FLOW = YEELIGHT_FLOW_TRANSITION_SCHEMA

Definition at line 180 of file light.py.

◆ SERVICE_SET_AUTO_DELAY_OFF_SCENE

string homeassistant.components.yeelight.light.SERVICE_SET_AUTO_DELAY_OFF_SCENE = "set_auto_delay_off_scene"

Definition at line 82 of file light.py.

◆ SERVICE_SET_COLOR_FLOW_SCENE

string homeassistant.components.yeelight.light.SERVICE_SET_COLOR_FLOW_SCENE = "set_color_flow_scene"

Definition at line 81 of file light.py.

◆ SERVICE_SET_COLOR_SCENE

string homeassistant.components.yeelight.light.SERVICE_SET_COLOR_SCENE = "set_color_scene"

Definition at line 78 of file light.py.

◆ SERVICE_SET_COLOR_TEMP_SCENE

string homeassistant.components.yeelight.light.SERVICE_SET_COLOR_TEMP_SCENE = "set_color_temp_scene"

Definition at line 80 of file light.py.

◆ SERVICE_SET_HSV_SCENE

string homeassistant.components.yeelight.light.SERVICE_SET_HSV_SCENE = "set_hsv_scene"

Definition at line 79 of file light.py.

◆ SERVICE_SET_MODE

string homeassistant.components.yeelight.light.SERVICE_SET_MODE = "set_mode"

Definition at line 75 of file light.py.

◆ SERVICE_SET_MUSIC_MODE

string homeassistant.components.yeelight.light.SERVICE_SET_MUSIC_MODE = "set_music_mode"

Definition at line 76 of file light.py.

◆ SERVICE_START_FLOW

string homeassistant.components.yeelight.light.SERVICE_START_FLOW = "start_flow"

Definition at line 77 of file light.py.

◆ VALID_BRIGHTNESS

homeassistant.components.yeelight.light.VALID_BRIGHTNESS = vol.All(vol.Coerce(int), vol.Range(min=1, max=100))

Definition at line 172 of file light.py.

◆ VolDictType

homeassistant.components.yeelight.light.VolDictType

Definition at line 174 of file light.py.

◆ YEELIGHT_COLOR_EFFECT_LIST

list homeassistant.components.yeelight.light.YEELIGHT_COLOR_EFFECT_LIST
Initial value:
1 = [
2  EFFECT_STROBE_COLOR,
3  EFFECT_POLICE,
4  EFFECT_CHRISTMAS,
5  EFFECT_RGB,
6  EFFECT_RANDOM_LOOP,
7  EFFECT_FAST_RANDOM_LOOP,
8  EFFECT_LSD,
9  EFFECT_SLOWDOWN,
10  EFFECT_NIGHT_MODE,
11  EFFECT_DATE_NIGHT,
12  EFFECT_MOVIE,
13  EFFECT_SUNRISE,
14  EFFECT_SUNSET,
15  EFFECT_ROMANCE,
16  EFFECT_HAPPY_BIRTHDAY,
17  *YEELIGHT_MONO_EFFECT_LIST,
18 ]

Definition at line 128 of file light.py.

◆ YEELIGHT_MONO_EFFECT_LIST

list homeassistant.components.yeelight.light.YEELIGHT_MONO_EFFECT_LIST
Initial value:
1 = [
2  EFFECT_DISCO,
3  EFFECT_STROBE,
4  EFFECT_ALARM,
5  EFFECT_POLICE2,
6  EFFECT_WHATSAPP,
7  EFFECT_FACEBOOK,
8  EFFECT_TWITTER,
9  EFFECT_HOME,
10  EFFECT_CANDLE_FLICKER,
11  EFFECT_TEA_TIME,
12  *YEELIGHT_TEMP_ONLY_EFFECT_LIST,
13 ]

Definition at line 114 of file light.py.

◆ YEELIGHT_TEMP_ONLY_EFFECT_LIST

list homeassistant.components.yeelight.light.YEELIGHT_TEMP_ONLY_EFFECT_LIST = [EFFECT_TEMP, EFFECT_STOP]

Definition at line 112 of file light.py.