Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.hue.v1.light Namespace Reference

Classes

class  HueLight
 

Functions

def async_safe_fetch (bridge, fetch_method)
 
def async_setup_entry (hass, config_entry, async_add_entities)
 
def async_setup_platform (hass, config, async_add_entities, discovery_info=None)
 
def async_update_items (bridge, api, current, async_add_entities, create_item, new_items_callback)
 
def create_light (item_class, coordinator, bridge, is_group, rooms, api, item_id)
 
def hass_to_hue_brightness (value)
 
def hue_brightness_to_hass (value)
 

Variables

string ATTR_IS_HUE_GROUP = "is_hue_group"
 
dictionary COLOR_MODES_HUE
 
dictionary COLOR_MODES_HUE_COLOR = {ColorMode.HS}
 
dictionary COLOR_MODES_HUE_COLOR_TEMP = {ColorMode.COLOR_TEMP}
 
dictionary COLOR_MODES_HUE_DIMMABLE = {ColorMode.BRIGHTNESS}
 
dictionary COLOR_MODES_HUE_EXTENDED = {ColorMode.COLOR_TEMP, ColorMode.HS}
 
dictionary COLOR_MODES_HUE_ON_OFF = {ColorMode.ONOFF}
 
string GAMUT_TYPE_UNAVAILABLE = "None"
 
tuple GROUP_MIN_API_VERSION = (1, 13, 0)
 
 LOGGER = logging.getLogger(__name__)
 
 SCAN_INTERVAL = timedelta(seconds=5)
 
dictionary SUPPORT_HUE
 
 SUPPORT_HUE_COLOR = SUPPORT_HUE_DIMMABLE | LightEntityFeature.EFFECT
 
 SUPPORT_HUE_COLOR_TEMP = SUPPORT_HUE_DIMMABLE
 
 SUPPORT_HUE_DIMMABLE = SUPPORT_HUE_ON_OFF
 
 SUPPORT_HUE_EXTENDED = SUPPORT_HUE_COLOR_TEMP | SUPPORT_HUE_COLOR
 
 SUPPORT_HUE_ON_OFF = LightEntityFeature.FLASH | LightEntityFeature.TRANSITION
 

Detailed Description

Support for the Philips Hue lights.

Function Documentation

◆ async_safe_fetch()

def homeassistant.components.hue.v1.light.async_safe_fetch (   bridge,
  fetch_method 
)
Safely fetch data.

Definition at line 263 of file light.py.

◆ async_setup_entry()

def homeassistant.components.hue.v1.light.async_setup_entry (   hass,
  config_entry,
  async_add_entities 
)
Set up the Hue lights from a config entry.

Definition at line 140 of file light.py.

◆ async_setup_platform()

def homeassistant.components.hue.v1.light.async_setup_platform (   hass,
  config,
  async_add_entities,
  discovery_info = None 
)
Old way of setting up Hue lights.

Can only be called when a user accidentally mentions hue platform in their
config. But even in that case it would have been ignored.

Definition at line 98 of file light.py.

◆ async_update_items()

def homeassistant.components.hue.v1.light.async_update_items (   bridge,
  api,
  current,
  async_add_entities,
  create_item,
  new_items_callback 
)
Update items.

Definition at line 276 of file light.py.

◆ create_light()

def homeassistant.components.hue.v1.light.create_light (   item_class,
  coordinator,
  bridge,
  is_group,
  rooms,
  api,
  item_id 
)
Create the light.

Definition at line 106 of file light.py.

◆ hass_to_hue_brightness()

def homeassistant.components.hue.v1.light.hass_to_hue_brightness (   value)
Convert hass brightness 0..255 to hue 1..254 scale.

Definition at line 303 of file light.py.

◆ hue_brightness_to_hass()

def homeassistant.components.hue.v1.light.hue_brightness_to_hass (   value)
Convert hue brightness 1..254 to hass format 0..255.

Definition at line 298 of file light.py.

Variable Documentation

◆ ATTR_IS_HUE_GROUP

string homeassistant.components.hue.v1.light.ATTR_IS_HUE_GROUP = "is_hue_group"

Definition at line 89 of file light.py.

◆ COLOR_MODES_HUE

dictionary homeassistant.components.hue.v1.light.COLOR_MODES_HUE
Initial value:
1 = {
2  "Extended color light": COLOR_MODES_HUE_EXTENDED,
3  "Color light": COLOR_MODES_HUE_COLOR,
4  "Dimmable light": COLOR_MODES_HUE_DIMMABLE,
5  "On/Off plug-in unit": COLOR_MODES_HUE_ON_OFF,
6  "Color temperature light": COLOR_MODES_HUE_COLOR_TEMP,
7 }

Definition at line 67 of file light.py.

◆ COLOR_MODES_HUE_COLOR

dictionary homeassistant.components.hue.v1.light.COLOR_MODES_HUE_COLOR = {ColorMode.HS}

Definition at line 64 of file light.py.

◆ COLOR_MODES_HUE_COLOR_TEMP

dictionary homeassistant.components.hue.v1.light.COLOR_MODES_HUE_COLOR_TEMP = {ColorMode.COLOR_TEMP}

Definition at line 63 of file light.py.

◆ COLOR_MODES_HUE_DIMMABLE

dictionary homeassistant.components.hue.v1.light.COLOR_MODES_HUE_DIMMABLE = {ColorMode.BRIGHTNESS}

Definition at line 62 of file light.py.

◆ COLOR_MODES_HUE_EXTENDED

dictionary homeassistant.components.hue.v1.light.COLOR_MODES_HUE_EXTENDED = {ColorMode.COLOR_TEMP, ColorMode.HS}

Definition at line 65 of file light.py.

◆ COLOR_MODES_HUE_ON_OFF

dictionary homeassistant.components.hue.v1.light.COLOR_MODES_HUE_ON_OFF = {ColorMode.ONOFF}

Definition at line 61 of file light.py.

◆ GAMUT_TYPE_UNAVAILABLE

string homeassistant.components.hue.v1.light.GAMUT_TYPE_UNAVAILABLE = "None"

Definition at line 90 of file light.py.

◆ GROUP_MIN_API_VERSION

tuple homeassistant.components.hue.v1.light.GROUP_MIN_API_VERSION = (1, 13, 0)

Definition at line 95 of file light.py.

◆ LOGGER

homeassistant.components.hue.v1.light.LOGGER = logging.getLogger(__name__)

Definition at line 59 of file light.py.

◆ SCAN_INTERVAL

homeassistant.components.hue.v1.light.SCAN_INTERVAL = timedelta(seconds=5)

Definition at line 57 of file light.py.

◆ SUPPORT_HUE

dictionary homeassistant.components.hue.v1.light.SUPPORT_HUE
Initial value:
1 = {
2  "Extended color light": SUPPORT_HUE_EXTENDED,
3  "Color light": SUPPORT_HUE_COLOR,
4  "Dimmable light": SUPPORT_HUE_DIMMABLE,
5  "On/Off plug-in unit": SUPPORT_HUE_ON_OFF,
6  "Color temperature light": SUPPORT_HUE_COLOR_TEMP,
7 }

Definition at line 81 of file light.py.

◆ SUPPORT_HUE_COLOR

homeassistant.components.hue.v1.light.SUPPORT_HUE_COLOR = SUPPORT_HUE_DIMMABLE | LightEntityFeature.EFFECT

Definition at line 78 of file light.py.

◆ SUPPORT_HUE_COLOR_TEMP

homeassistant.components.hue.v1.light.SUPPORT_HUE_COLOR_TEMP = SUPPORT_HUE_DIMMABLE

Definition at line 77 of file light.py.

◆ SUPPORT_HUE_DIMMABLE

homeassistant.components.hue.v1.light.SUPPORT_HUE_DIMMABLE = SUPPORT_HUE_ON_OFF

Definition at line 76 of file light.py.

◆ SUPPORT_HUE_EXTENDED

homeassistant.components.hue.v1.light.SUPPORT_HUE_EXTENDED = SUPPORT_HUE_COLOR_TEMP | SUPPORT_HUE_COLOR

Definition at line 79 of file light.py.

◆ SUPPORT_HUE_ON_OFF

homeassistant.components.hue.v1.light.SUPPORT_HUE_ON_OFF = LightEntityFeature.FLASH | LightEntityFeature.TRANSITION

Definition at line 75 of file light.py.