Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.hue.v2.device_trigger Namespace Reference

Functions

CALLBACK_TYPE async_attach_trigger (HueBridge bridge, DeviceEntry device_entry, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 
list[dict[str, Any]] async_get_triggers (HueBridge bridge, DeviceEntry device_entry)
 
ConfigType async_validate_trigger_config (HueBridge bridge, DeviceEntry device_entry, ConfigType config)
 
str|None get_hue_device_id (DeviceEntry device_entry)
 

Variables

 TRIGGER_SCHEMA
 

Detailed Description

Provides device automations for Philips Hue events.

Function Documentation

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.hue.v2.device_trigger.async_attach_trigger ( HueBridge  bridge,
DeviceEntry  device_entry,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info 
)
Listen for state changes based on configuration.

Definition at line 58 of file device_trigger.py.

◆ async_get_triggers()

list[dict[str, Any]] homeassistant.components.hue.v2.device_trigger.async_get_triggers ( HueBridge  bridge,
DeviceEntry   device_entry 
)
Return device triggers for device on `v2` bridge.

Definition at line 84 of file device_trigger.py.

◆ async_validate_trigger_config()

ConfigType homeassistant.components.hue.v2.device_trigger.async_validate_trigger_config ( HueBridge  bridge,
DeviceEntry  device_entry,
ConfigType  config 
)
Validate config.

Definition at line 49 of file device_trigger.py.

◆ get_hue_device_id()

str | None homeassistant.components.hue.v2.device_trigger.get_hue_device_id ( DeviceEntry  device_entry)
Get Hue device id from device entry.

Definition at line 130 of file device_trigger.py.

Variable Documentation

◆ TRIGGER_SCHEMA

homeassistant.components.hue.v2.device_trigger.TRIGGER_SCHEMA
Initial value:
1 = DEVICE_TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_TYPE): str,
4  vol.Required(CONF_SUBTYPE): vol.Union(int, str),
5  vol.Optional(CONF_UNIQUE_ID): str,
6  }
7 )

Definition at line 40 of file device_trigger.py.