Advertisement
Dalewn

Example light automation

Apr 20th, 2024
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.60 KB | Source Code | 0 0
  1. alias: Test - Desk Presence
  2. description: ""
  3. trigger:
  4.   - platform: state
  5.     entity_id:
  6.      - binary_sensor.presence_desk_presence
  7. condition: []
  8. action:
  9.   - if:
  10.       - condition: state
  11.         entity_id: binary_sensor.presence_desk_presence
  12.         state: "on"
  13.     then:
  14.       - type: turn_on
  15.         device_id: 29d4ea14dbadaf2b25798665e68a5fb0
  16.         entity_id: 9d294267ff09024ecbd1d54946916ef1
  17.         domain: light
  18.     else:
  19.       - type: turn_off
  20.         device_id: 29d4ea14dbadaf2b25798665e68a5fb0
  21.         entity_id: 9d294267ff09024ecbd1d54946916ef1
  22.         domain: light
  23. mode: single
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement