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

Classes

class  WiLightLightColor
 
class  WiLightLightDimmer
 
class  WiLightLightOnOff
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 
list[LightEntityentities_from_discovered_wilight (PyWiLightDevice api_device)
 
int hass_to_wilight_hue (float value)
 
int hass_to_wilight_saturation (float value)
 
float wilight_to_hass_hue (int value)
 
float wilight_to_hass_saturation (int value)
 

Detailed Description

Support for WiLight lights.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.wilight.light.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback   async_add_entities 
)
Set up WiLight lights from a config entry.

Definition at line 43 of file light.py.

◆ entities_from_discovered_wilight()

list[LightEntity] homeassistant.components.wilight.light.entities_from_discovered_wilight ( PyWiLightDevice  api_device)
Parse configuration and add WiLight light entities.

Definition at line 25 of file light.py.

◆ hass_to_wilight_hue()

int homeassistant.components.wilight.light.hass_to_wilight_hue ( float  value)
Convert hass hue 0..360 to wilight 1..255 scale.

Definition at line 113 of file light.py.

◆ hass_to_wilight_saturation()

int homeassistant.components.wilight.light.hass_to_wilight_saturation ( float  value)
Convert hass saturation 0..100 to wilight 1..255 scale.

Definition at line 123 of file light.py.

◆ wilight_to_hass_hue()

float homeassistant.components.wilight.light.wilight_to_hass_hue ( int  value)
Convert wilight hue 1..255 to hass 0..360 scale.

Definition at line 108 of file light.py.

◆ wilight_to_hass_saturation()

float homeassistant.components.wilight.light.wilight_to_hass_saturation ( int  value)
Convert wilight saturation 1..255 to hass 0..100 scale.

Definition at line 118 of file light.py.