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

Classes

class  Trigger
 
class  TriggerInstance
 

Functions

CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 
list[dict[str, str]] async_get_triggers (HomeAssistant hass, str device_id)
 
None async_remove_triggers (HomeAssistant hass, str device_id)
 
None async_setup_trigger (HomeAssistant hass, TasmotaTrigger tasmota_trigger, ConfigEntry config_entry, DiscoveryHashType discovery_hash)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_DISCOVERY_ID = "discovery_id"
 
string CONF_SUBTYPE = "subtype"
 
string DEVICE = "device"
 
string DEVICE_TRIGGERS = "tasmota_device_triggers"
 
 TRIGGER_SCHEMA
 

Detailed Description

Provides device automations for Tasmota.

Function Documentation

◆ async_attach_trigger()

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

Definition at line 301 of file device_trigger.py.

◆ async_get_triggers()

list[dict[str, str]] homeassistant.components.tasmota.device_trigger.async_get_triggers ( HomeAssistant  hass,
str   device_id 
)
List device triggers for a Tasmota device.

Definition at line 274 of file device_trigger.py.

◆ async_remove_triggers()

None homeassistant.components.tasmota.device_trigger.async_remove_triggers ( HomeAssistant  hass,
str  device_id 
)
Cleanup any device triggers for a Tasmota device.

Definition at line 254 of file device_trigger.py.

◆ async_setup_trigger()

None homeassistant.components.tasmota.device_trigger.async_setup_trigger ( HomeAssistant  hass,
TasmotaTrigger  tasmota_trigger,
ConfigEntry  config_entry,
DiscoveryHashType  discovery_hash 
)
Set up a discovered Tasmota device trigger.

Definition at line 172 of file device_trigger.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.tasmota.device_trigger._LOGGER = logging.getLogger(__name__)
private

Definition at line 28 of file device_trigger.py.

◆ CONF_DISCOVERY_ID

string homeassistant.components.tasmota.device_trigger.CONF_DISCOVERY_ID = "discovery_id"

Definition at line 30 of file device_trigger.py.

◆ CONF_SUBTYPE

string homeassistant.components.tasmota.device_trigger.CONF_SUBTYPE = "subtype"

Definition at line 31 of file device_trigger.py.

◆ DEVICE

string homeassistant.components.tasmota.device_trigger.DEVICE = "device"

Definition at line 32 of file device_trigger.py.

◆ DEVICE_TRIGGERS

string homeassistant.components.tasmota.device_trigger.DEVICE_TRIGGERS = "tasmota_device_triggers"

Definition at line 45 of file device_trigger.py.

◆ TRIGGER_SCHEMA

homeassistant.components.tasmota.device_trigger.TRIGGER_SCHEMA
Initial value:
1 = DEVICE_TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): DEVICE,
4  vol.Required(CONF_DOMAIN): DOMAIN,
5  vol.Required(CONF_DEVICE_ID): str,
6  vol.Required(CONF_DISCOVERY_ID): str,
7  vol.Required(CONF_TYPE): cv.string,
8  vol.Required(CONF_SUBTYPE): cv.string,
9  }
10 )

Definition at line 34 of file device_trigger.py.