Advertisement
rootiest

sample choose trigger_id automation

Oct 8th, 2021
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.78 KB | None | 0 0
  1. alias: Test Remote Button
  2. description: ''
  3. mode: single
  4. trigger:
  5.   - platform: mqtt
  6.     topic: zigbee2mqtt/Living Room Remote/action
  7.     id: living_room_button_on
  8.     payload: 'on'
  9.   - platform: mqtt
  10.     topic: zigbee2mqtt/Living Room Remote/action
  11.     id: living_room_button_off
  12.     payload: 'off'
  13. condition: []
  14. action:
  15.   - choose:
  16.       - conditions:
  17.           - condition: trigger
  18.             id: living_room_button_on
  19.         sequence:
  20.           - service: switch.turn_on
  21.             target:
  22.               entity_id: switch.bedroom_switch
  23.       - conditions:
  24.           - condition: trigger
  25.             id: living_room_button_off
  26.         sequence:
  27.           - service: switch.turn_off
  28.             target:
  29.               entity_id: switch.bedroom_switch
  30.     default: []
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement