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

Classes

class  XiaomiGatewayBulb
 
class  XiaomiGatewayLight
 
class  XiaomiPhilipsAbstractLight
 
class  XiaomiPhilipsBulb
 
class  XiaomiPhilipsCeilingLamp
 
class  XiaomiPhilipsEyecareLamp
 
class  XiaomiPhilipsEyecareLampAmbientLight
 
class  XiaomiPhilipsGenericLight
 
class  XiaomiPhilipsMoonlightLamp
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_AUTOMATIC_COLOR_TEMPERATURE = "automatic_color_temperature"
 
string ATTR_BAND = "band"
 
string ATTR_BAND_SLEEP = "band_sleep"
 
string ATTR_DELAYED_TURN_OFF = "delayed_turn_off"
 
string ATTR_EYECARE_MODE = "eyecare_mode"
 
string ATTR_NIGHT_LIGHT_MODE = "night_light_mode"
 
string ATTR_REMINDER = "reminder"
 
string ATTR_SCENE = "scene"
 
string ATTR_SLEEP_ASSISTANT = "sleep_assistant"
 
string ATTR_SLEEP_OFF_TIME = "sleep_off_time"
 
string ATTR_TIME_PERIOD = "time_period"
 
string ATTR_TOTAL_ASSISTANT_SLEEP_TIME = "total_assistant_sleep_time"
 
int CCT_MAX = 100
 
int CCT_MIN = 1
 
string DATA_KEY = "light.xiaomi_miio"
 
string DEFAULT_NAME = "Xiaomi Philips Light"
 
int DELAYED_TURN_OFF_MAX_DEVIATION_MINUTES = 1
 
int DELAYED_TURN_OFF_MAX_DEVIATION_SECONDS = 4
 
 SERVICE_SCHEMA_SET_DELAYED_TURN_OFF
 
 SERVICE_SCHEMA_SET_SCENE
 
dictionary SERVICE_TO_METHOD
 
list SUCCESS = ["ok"]
 
 XIAOMI_MIIO_SERVICE_SCHEMA = vol.Schema({vol.Optional(ATTR_ENTITY_ID): cv.entity_ids})
 

Detailed Description

Support for Xiaomi Philips Lights.

Function Documentation

◆ async_setup_entry()

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

Definition at line 132 of file light.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 72 of file light.py.

◆ ATTR_AUTOMATIC_COLOR_TEMPERATURE

string homeassistant.components.xiaomi_miio.light.ATTR_AUTOMATIC_COLOR_TEMPERATURE = "automatic_color_temperature"

Definition at line 89 of file light.py.

◆ ATTR_BAND

string homeassistant.components.xiaomi_miio.light.ATTR_BAND = "band"

Definition at line 98 of file light.py.

◆ ATTR_BAND_SLEEP

string homeassistant.components.xiaomi_miio.light.ATTR_BAND_SLEEP = "band_sleep"

Definition at line 97 of file light.py.

◆ ATTR_DELAYED_TURN_OFF

string homeassistant.components.xiaomi_miio.light.ATTR_DELAYED_TURN_OFF = "delayed_turn_off"

Definition at line 86 of file light.py.

◆ ATTR_EYECARE_MODE

string homeassistant.components.xiaomi_miio.light.ATTR_EYECARE_MODE = "eyecare_mode"

Definition at line 91 of file light.py.

◆ ATTR_NIGHT_LIGHT_MODE

string homeassistant.components.xiaomi_miio.light.ATTR_NIGHT_LIGHT_MODE = "night_light_mode"

Definition at line 88 of file light.py.

◆ ATTR_REMINDER

string homeassistant.components.xiaomi_miio.light.ATTR_REMINDER = "reminder"

Definition at line 90 of file light.py.

◆ ATTR_SCENE

string homeassistant.components.xiaomi_miio.light.ATTR_SCENE = "scene"

Definition at line 85 of file light.py.

◆ ATTR_SLEEP_ASSISTANT

string homeassistant.components.xiaomi_miio.light.ATTR_SLEEP_ASSISTANT = "sleep_assistant"

Definition at line 94 of file light.py.

◆ ATTR_SLEEP_OFF_TIME

string homeassistant.components.xiaomi_miio.light.ATTR_SLEEP_OFF_TIME = "sleep_off_time"

Definition at line 95 of file light.py.

◆ ATTR_TIME_PERIOD

string homeassistant.components.xiaomi_miio.light.ATTR_TIME_PERIOD = "time_period"

Definition at line 87 of file light.py.

◆ ATTR_TOTAL_ASSISTANT_SLEEP_TIME

string homeassistant.components.xiaomi_miio.light.ATTR_TOTAL_ASSISTANT_SLEEP_TIME = "total_assistant_sleep_time"

Definition at line 96 of file light.py.

◆ CCT_MAX

int homeassistant.components.xiaomi_miio.light.CCT_MAX = 100

Definition at line 79 of file light.py.

◆ CCT_MIN

int homeassistant.components.xiaomi_miio.light.CCT_MIN = 1

Definition at line 78 of file light.py.

◆ DATA_KEY

string homeassistant.components.xiaomi_miio.light.DATA_KEY = "light.xiaomi_miio"

Definition at line 75 of file light.py.

◆ DEFAULT_NAME

string homeassistant.components.xiaomi_miio.light.DEFAULT_NAME = "Xiaomi Philips Light"

Definition at line 74 of file light.py.

◆ DELAYED_TURN_OFF_MAX_DEVIATION_MINUTES

int homeassistant.components.xiaomi_miio.light.DELAYED_TURN_OFF_MAX_DEVIATION_MINUTES = 1

Definition at line 82 of file light.py.

◆ DELAYED_TURN_OFF_MAX_DEVIATION_SECONDS

int homeassistant.components.xiaomi_miio.light.DELAYED_TURN_OFF_MAX_DEVIATION_SECONDS = 4

Definition at line 81 of file light.py.

◆ SERVICE_SCHEMA_SET_DELAYED_TURN_OFF

homeassistant.components.xiaomi_miio.light.SERVICE_SCHEMA_SET_DELAYED_TURN_OFF
Initial value:
1 = XIAOMI_MIIO_SERVICE_SCHEMA.extend(
2  {vol.Required(ATTR_TIME_PERIOD): cv.positive_time_period}
3 )

Definition at line 106 of file light.py.

◆ SERVICE_SCHEMA_SET_SCENE

homeassistant.components.xiaomi_miio.light.SERVICE_SCHEMA_SET_SCENE
Initial value:
1 = XIAOMI_MIIO_SERVICE_SCHEMA.extend(
2  {vol.Required(ATTR_SCENE): vol.All(vol.Coerce(int), vol.Clamp(min=1, max=6))}
3 )

Definition at line 102 of file light.py.

◆ SERVICE_TO_METHOD

dictionary homeassistant.components.xiaomi_miio.light.SERVICE_TO_METHOD
Initial value:
1 = {
2  SERVICE_SET_DELAYED_TURN_OFF: ServiceMethodDetails(
3  method="async_set_delayed_turn_off",
4  schema=SERVICE_SCHEMA_SET_DELAYED_TURN_OFF,
5  ),
6  SERVICE_SET_SCENE: ServiceMethodDetails(
7  method="async_set_scene",
8  schema=SERVICE_SCHEMA_SET_SCENE,
9  ),
10  SERVICE_REMINDER_ON: ServiceMethodDetails(method="async_reminder_on"),
11  SERVICE_REMINDER_OFF: ServiceMethodDetails(method="async_reminder_off"),
12  SERVICE_NIGHT_LIGHT_MODE_ON: ServiceMethodDetails(
13  method="async_night_light_mode_on"
14  ),
15  SERVICE_NIGHT_LIGHT_MODE_OFF: ServiceMethodDetails(
16  method="async_night_light_mode_off"
17  ),
18  SERVICE_EYECARE_MODE_ON: ServiceMethodDetails(method="async_eyecare_mode_on"),
19  SERVICE_EYECARE_MODE_OFF: ServiceMethodDetails(method="async_eyecare_mode_off"),
20 }

Definition at line 110 of file light.py.

◆ SUCCESS

list homeassistant.components.xiaomi_miio.light.SUCCESS = ["ok"]

Definition at line 84 of file light.py.

◆ XIAOMI_MIIO_SERVICE_SCHEMA

homeassistant.components.xiaomi_miio.light.XIAOMI_MIIO_SERVICE_SCHEMA = vol.Schema({vol.Optional(ATTR_ENTITY_ID): cv.entity_ids})

Definition at line 100 of file light.py.