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. For most automations, use the purpose-specific triggers and conditions instead, such as Door opened or Light is on. They’re easier to set up and to read. Use device automations for things that no other trigger or condition covers, such as button presses on some remotes.

MQTT device triggers are set up through MQTT discovery.

Device trigger

The Device trigger starts an automation when something happens to a device, such as a button press on a remote. In most cases, you don’t need it. Use a purpose-specific trigger instead, such as Light turned on. For more information on the difference, refer to How the Device trigger differs from other triggers.

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. For examples, refer to the Device trigger page.