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

Functions

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

Variables

dictionary ACCESS_CONTROL_SCHEMA = {vol.Optional("code"): vol.All(vol.Lower, cv.string)}
 
 LCN_DEVICE_TRIGGER_BASE_SCHEMA
 
dictionary SENDKEYS_SCHEMA
 
dictionary TRANSMITTER_SCHEMA
 
 TRIGGER_SCHEMA
 
dictionary TRIGGER_TYPES = {"transmitter", "transponder", "fingerprint", "codelock", "send_keys"}
 
dictionary TYPE_SCHEMAS
 

Detailed Description

Provides device triggers for LCN.

Function Documentation

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.lcn.device_trigger.async_attach_trigger ( HomeAssistant  hass,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info 
)
Attach a trigger.

Definition at line 73 of file device_trigger.py.

◆ async_get_trigger_capabilities()

dict[str, vol.Schema] homeassistant.components.lcn.device_trigger.async_get_trigger_capabilities ( HomeAssistant  hass,
ConfigType   config 
)
List trigger capabilities.

Definition at line 102 of file device_trigger.py.

◆ async_get_triggers()

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

Definition at line 52 of file device_trigger.py.

Variable Documentation

◆ ACCESS_CONTROL_SCHEMA

dictionary homeassistant.components.lcn.device_trigger.ACCESS_CONTROL_SCHEMA = {vol.Optional("code"): vol.All(vol.Lower, cv.string)}

Definition at line 23 of file device_trigger.py.

◆ LCN_DEVICE_TRIGGER_BASE_SCHEMA

homeassistant.components.lcn.device_trigger.LCN_DEVICE_TRIGGER_BASE_SCHEMA
Initial value:
1 = DEVICE_TRIGGER_BASE_SCHEMA.extend(
2  {vol.Required(CONF_TYPE): vol.In(TRIGGER_TYPES)}
3 )

Definition at line 19 of file device_trigger.py.

◆ SENDKEYS_SCHEMA

dictionary homeassistant.components.lcn.device_trigger.SENDKEYS_SCHEMA
Initial value:
1 = {
2  vol.Optional("key"): vol.In([key.lower() for key in SENDKEYS]),
3  vol.Optional("action"): vol.In([action.lower() for action in KEY_ACTIONS]),
4 }

Definition at line 32 of file device_trigger.py.

◆ TRANSMITTER_SCHEMA

dictionary homeassistant.components.lcn.device_trigger.TRANSMITTER_SCHEMA
Initial value:
1 = {
2  **ACCESS_CONTROL_SCHEMA,
3  vol.Optional("level"): cv.positive_int,
4  vol.Optional("key"): cv.positive_int,
5  vol.Optional("action"): vol.In([action.lower() for action in KEY_ACTIONS]),
6 }

Definition at line 25 of file device_trigger.py.

◆ TRIGGER_SCHEMA

homeassistant.components.lcn.device_trigger.TRIGGER_SCHEMA
Initial value:
1 = vol.Any(
2  LCN_DEVICE_TRIGGER_BASE_SCHEMA.extend(ACCESS_CONTROL_SCHEMA),
3  LCN_DEVICE_TRIGGER_BASE_SCHEMA.extend(TRANSMITTER_SCHEMA),
4  LCN_DEVICE_TRIGGER_BASE_SCHEMA.extend(SENDKEYS_SCHEMA),
5 )

Definition at line 37 of file device_trigger.py.

◆ TRIGGER_TYPES

dictionary homeassistant.components.lcn.device_trigger.TRIGGER_TYPES = {"transmitter", "transponder", "fingerprint", "codelock", "send_keys"}

Definition at line 17 of file device_trigger.py.

◆ TYPE_SCHEMAS

dictionary homeassistant.components.lcn.device_trigger.TYPE_SCHEMAS
Initial value:
1 = {
2  "transmitter": {"extra_fields": vol.Schema(TRANSMITTER_SCHEMA)},
3  "transponder": {"extra_fields": vol.Schema(ACCESS_CONTROL_SCHEMA)},
4  "fingerprint": {"extra_fields": vol.Schema(ACCESS_CONTROL_SCHEMA)},
5  "codelock": {"extra_fields": vol.Schema(ACCESS_CONTROL_SCHEMA)},
6  "send_keys": {"extra_fields": vol.Schema(SENDKEYS_SCHEMA)},
7 }

Definition at line 43 of file device_trigger.py.