Automation generator

Generate Home Assistant YAML from common smart home scenarios

Start with five proven automation patterns, then replace entity IDs with your actual Home Assistant entities.

Recommended devices

Aqara Presence Sensor FP2Eve MotionAqara Motion Sensor P1
Home Assistant YAML
alias: Turn on light when presence is detected
trigger:
  - platform: state
    entity_id: binary_sensor.presence_sensor
    to: "on"
condition:
  - condition: sun
    after: sunset
action:
  - service: light.turn_on
    target:
      entity_id: light.hallway
mode: single