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

Classes

class  DeconzBaseLight
 
class  DeconzGroup
 
class  DeconzLight
 
class  SetStateAttributes
 

Functions

None __init__ (self, _LightDeviceT device, DeconzHub hub)
 
None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
None async_turn_off (self, **Any kwargs)
 
None async_turn_on (self, **Any kwargs)
 
int|None brightness (self)
 
str|None color_mode (self)
 
int|None color_temp (self)
 
dict[str, bool] extra_state_attributes (self)
 
tuple[float, float]|None hs_color (self)
 
bool|None is_on (self)
 
None update_color_state (Group group, list[Light] lights, bool override=False)
 
tuple[float, float]|None xy_color (self)
 

Variables

 _attr_color_mode = ColorMode.UNKNOWN
 
 _attr_effect_list
 
 api
 
string DECONZ_GROUP = "is_deconz_group"
 
dictionary DECONZ_TO_COLOR_MODE
 
dictionary EFFECT_TO_DECONZ
 
dictionary FLASH_TO_DECONZ = {FLASH_SHORT: LightAlert.SHORT, FLASH_LONG: LightAlert.LONG}
 
 TYPE = LIGHT_DOMAIN
 
list XMAS_LIGHT_EFFECTS
 

Detailed Description

Support for deCONZ lights.

Function Documentation

◆ __init__()

None homeassistant.components.deconz.light.__init__ (   self,
_LightDeviceT  device,
DeconzHub  hub 
)
Set up light.

Definition at line 191 of file light.py.

◆ async_setup_entry()

None homeassistant.components.deconz.light.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up the deCONZ lights and groups from a config entry.

Definition at line 136 of file light.py.

◆ async_turn_off()

None homeassistant.components.deconz.light.async_turn_off (   self,
**Any  kwargs 
)
Turn off light.

Definition at line 314 of file light.py.

◆ async_turn_on()

None homeassistant.components.deconz.light.async_turn_on (   self,
**Any  kwargs 
)
Turn on light.

Definition at line 280 of file light.py.

◆ brightness()

int | None homeassistant.components.deconz.light.brightness (   self)
Return the brightness of this light between 0..255.

Definition at line 254 of file light.py.

◆ color_mode()

str | None homeassistant.components.deconz.light.color_mode (   self)
Return the color mode of the light.

Definition at line 239 of file light.py.

◆ color_temp()

int | None homeassistant.components.deconz.light.color_temp (   self)
Return the CT color value.

Definition at line 259 of file light.py.

◆ extra_state_attributes()

dict[str, bool] homeassistant.components.deconz.light.extra_state_attributes (   self)
Return the device state attributes.

Definition at line 332 of file light.py.

◆ hs_color()

tuple[float, float] | None homeassistant.components.deconz.light.hs_color (   self)
Return the hs color value.

Definition at line 264 of file light.py.

◆ is_on()

bool | None homeassistant.components.deconz.light.is_on (   self)
Return true if light is on.

Definition at line 276 of file light.py.

◆ update_color_state()

None homeassistant.components.deconz.light.update_color_state ( Group  group,
list[Light]  lights,
bool   override = False 
)
Sync group color state with light.

Definition at line 119 of file light.py.

◆ xy_color()

tuple[float, float] | None homeassistant.components.deconz.light.xy_color (   self)
Return the XY color value.

Definition at line 271 of file light.py.

Variable Documentation

◆ _attr_color_mode

homeassistant.components.deconz.light._attr_color_mode = ColorMode.UNKNOWN
private

Definition at line 189 of file light.py.

◆ _attr_effect_list

homeassistant.components.deconz.light._attr_effect_list
private

Definition at line 225 of file light.py.

◆ api

homeassistant.components.deconz.light.api

Definition at line 197 of file light.py.

◆ DECONZ_GROUP

string homeassistant.components.deconz.light.DECONZ_GROUP = "is_deconz_group"

Definition at line 39 of file light.py.

◆ DECONZ_TO_COLOR_MODE

dictionary homeassistant.components.deconz.light.DECONZ_TO_COLOR_MODE
Initial value:
1 = {
2  LightColorMode.CT: ColorMode.COLOR_TEMP,
3  LightColorMode.GRADIENT: ColorMode.XY,
4  LightColorMode.HS: ColorMode.HS,
5  LightColorMode.XY: ColorMode.XY,
6 }

Definition at line 78 of file light.py.

◆ EFFECT_TO_DECONZ

dictionary homeassistant.components.deconz.light.EFFECT_TO_DECONZ

Definition at line 40 of file light.py.

◆ FLASH_TO_DECONZ

dictionary homeassistant.components.deconz.light.FLASH_TO_DECONZ = {FLASH_SHORT: LightAlert.SHORT, FLASH_LONG: LightAlert.LONG}

Definition at line 76 of file light.py.

◆ TYPE

homeassistant.components.deconz.light.TYPE = LIGHT_DOMAIN
Representation of a deCONZ light.

Definition at line 188 of file light.py.

◆ XMAS_LIGHT_EFFECTS

list homeassistant.components.deconz.light.XMAS_LIGHT_EFFECTS
Initial value:
1 = [
2  "carnival",
3  "collide",
4  "fading",
5  "fireworks",
6  "flag",
7  "glow",
8  "rainbow",
9  "snake",
10  "snow",
11  "sparkles",
12  "steady",
13  "strobe",
14  "twinkle",
15  "updown",
16  "vintage",
17  "waves",
18 ]

Definition at line 85 of file light.py.