Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.yolink.device_trigger Namespace Reference

Functions

CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 
list[dict[str, Any]] async_get_triggers (HomeAssistant hass, str device_id)
 

Variables

string CONF_BUTTON_1 = "button_1"
 
string CONF_BUTTON_2 = "button_2"
 
string CONF_BUTTON_3 = "button_3"
 
string CONF_BUTTON_4 = "button_4"
 
string CONF_LONG_PRESS = "long_press"
 
string CONF_SHORT_PRESS = "short_press"
 
dictionary FLEX_FOB_2_BUTTONS
 
dictionary FLEX_FOB_4_BUTTONS
 
 TRIGGER_SCHEMA
 

Detailed Description

Provides device triggers for YoLink.

Function Documentation

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.yolink.device_trigger.async_attach_trigger ( HomeAssistant  hass,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info 
)
Listen for state changes based on configuration.

Definition at line 86 of file device_trigger.py.

◆ async_get_triggers()

list[dict[str, Any]] homeassistant.components.yolink.device_trigger.async_get_triggers ( HomeAssistant  hass,
str   device_id 
)
List device triggers for YoLink devices.

Definition at line 65 of file device_trigger.py.

Variable Documentation

◆ CONF_BUTTON_1

string homeassistant.components.yolink.device_trigger.CONF_BUTTON_1 = "button_1"

Definition at line 26 of file device_trigger.py.

◆ CONF_BUTTON_2

string homeassistant.components.yolink.device_trigger.CONF_BUTTON_2 = "button_2"

Definition at line 27 of file device_trigger.py.

◆ CONF_BUTTON_3

string homeassistant.components.yolink.device_trigger.CONF_BUTTON_3 = "button_3"

Definition at line 28 of file device_trigger.py.

◆ CONF_BUTTON_4

string homeassistant.components.yolink.device_trigger.CONF_BUTTON_4 = "button_4"

Definition at line 29 of file device_trigger.py.

◆ CONF_LONG_PRESS

string homeassistant.components.yolink.device_trigger.CONF_LONG_PRESS = "long_press"

Definition at line 31 of file device_trigger.py.

◆ CONF_SHORT_PRESS

string homeassistant.components.yolink.device_trigger.CONF_SHORT_PRESS = "short_press"

Definition at line 30 of file device_trigger.py.

◆ FLEX_FOB_2_BUTTONS

dictionary homeassistant.components.yolink.device_trigger.FLEX_FOB_2_BUTTONS
Initial value:
1 = {
2  f"{CONF_BUTTON_1}_{CONF_SHORT_PRESS}",
3  f"{CONF_BUTTON_1}_{CONF_LONG_PRESS}",
4  f"{CONF_BUTTON_2}_{CONF_SHORT_PRESS}",
5  f"{CONF_BUTTON_2}_{CONF_LONG_PRESS}",
6 }

Definition at line 44 of file device_trigger.py.

◆ FLEX_FOB_4_BUTTONS

dictionary homeassistant.components.yolink.device_trigger.FLEX_FOB_4_BUTTONS
Initial value:
1 = {
2  f"{CONF_BUTTON_1}_{CONF_SHORT_PRESS}",
3  f"{CONF_BUTTON_1}_{CONF_LONG_PRESS}",
4  f"{CONF_BUTTON_2}_{CONF_SHORT_PRESS}",
5  f"{CONF_BUTTON_2}_{CONF_LONG_PRESS}",
6  f"{CONF_BUTTON_3}_{CONF_SHORT_PRESS}",
7  f"{CONF_BUTTON_3}_{CONF_LONG_PRESS}",
8  f"{CONF_BUTTON_4}_{CONF_SHORT_PRESS}",
9  f"{CONF_BUTTON_4}_{CONF_LONG_PRESS}",
10 }

Definition at line 33 of file device_trigger.py.

◆ TRIGGER_SCHEMA

homeassistant.components.yolink.device_trigger.TRIGGER_SCHEMA
Initial value:
1 = DEVICE_TRIGGER_BASE_SCHEMA.extend(
2  {vol.Required(CONF_TYPE): vol.In(FLEX_FOB_4_BUTTONS)}
3 )

Definition at line 51 of file device_trigger.py.