Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.mqtt.device_automation Namespace Reference

Functions

None _async_setup_automation (HomeAssistant hass, ConfigType config, ConfigEntry config_entry, DiscoveryInfoType discovery_data)
 
None async_removed_from_device (HomeAssistant hass, str device_id)
 
None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry)
 

Variables

string AUTOMATION_TYPE_TRIGGER = "trigger"
 
list AUTOMATION_TYPES = [AUTOMATION_TYPE_TRIGGER]
 
 AUTOMATION_TYPES_SCHEMA = vol.In(AUTOMATION_TYPES)
 
string CONF_AUTOMATION_TYPE = "automation_type"
 
 DISCOVERY_SCHEMA
 

Detailed Description

Provides device automations for MQTT.

Function Documentation

◆ _async_setup_automation()

None homeassistant.components.mqtt.device_automation._async_setup_automation ( HomeAssistant  hass,
ConfigType  config,
ConfigEntry  config_entry,
DiscoveryInfoType  discovery_data 
)
private
Set up an MQTT device automation.

Definition at line 37 of file device_automation.py.

◆ async_removed_from_device()

None homeassistant.components.mqtt.device_automation.async_removed_from_device ( HomeAssistant  hass,
str  device_id 
)
Handle Mqtt removed from a device.

Definition at line 50 of file device_automation.py.

◆ async_setup_entry()

None homeassistant.components.mqtt.device_automation.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry 
)
Set up MQTT device automation dynamically through MQTT discovery.

Definition at line 28 of file device_automation.py.

Variable Documentation

◆ AUTOMATION_TYPE_TRIGGER

string homeassistant.components.mqtt.device_automation.AUTOMATION_TYPE_TRIGGER = "trigger"

Definition at line 17 of file device_automation.py.

◆ AUTOMATION_TYPES

list homeassistant.components.mqtt.device_automation.AUTOMATION_TYPES = [AUTOMATION_TYPE_TRIGGER]

Definition at line 18 of file device_automation.py.

◆ AUTOMATION_TYPES_SCHEMA

homeassistant.components.mqtt.device_automation.AUTOMATION_TYPES_SCHEMA = vol.In(AUTOMATION_TYPES)

Definition at line 19 of file device_automation.py.

◆ CONF_AUTOMATION_TYPE

string homeassistant.components.mqtt.device_automation.CONF_AUTOMATION_TYPE = "automation_type"

Definition at line 20 of file device_automation.py.

◆ DISCOVERY_SCHEMA

homeassistant.components.mqtt.device_automation.DISCOVERY_SCHEMA
Initial value:
1 = MQTT_BASE_SCHEMA.extend(
2  {vol.Required(CONF_AUTOMATION_TYPE): AUTOMATION_TYPES_SCHEMA},
3  extra=vol.ALLOW_EXTRA,
4 )

Definition at line 22 of file device_automation.py.