Device automation
Device automation is a plugin for the automation integration that allows other integrations to provide device-specific triggers, conditions, and actions.
There is no device automation-specific configuration. Instead, device automations are configured as part of regular automations.
Device automations are meant to be configured in the UI. In the visual automation editor, a device trigger can represent a state change, a button press on a remote, or another event provided by the integration. Unlike a state trigger, a device trigger is tied to a device and does not always need to target a specific entity.
MQTT device triggers are set up through MQTT discovery.
List of conditions
The Device automation integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following conditions. Each link below opens a dedicated page with examples, fields, and a step-by-step UI walkthrough.
-
Device (
device) Tests a condition that a device provides, such as whether a light is on.
For an overview of every condition across all integrations, see the conditions reference.
Using device automations in YAML
If you need YAML for an automation that is not managed in the UI, create the trigger in the visual automation editor first, then copy the YAML from the trigger.
Example:
- alias: "Light turns off"
triggers:
- trigger: device
device_id: 7a92d5ee74014a0b86903fc669b0bcd6
domain: light
type: turn_off
entity_id: light.bowl
actions:
- action: camera.turn_off