Advertisement
Fredo23

Sample_Lamp_Button

Jan 7th, 2025
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.79 KB | Source Code | 0 0
  1. id: '1736263368617'
  2. alias: test
  3. description: ''
  4. triggers:
  5.   - domain: mqtt
  6.     device_id: bc5dbf632d32f928a3cd5f3820d2a430
  7.     type: action
  8.     subtype: pressed
  9.     trigger: device
  10. conditions: []
  11. actions:
  12.   - if:
  13.       - condition: state
  14.         entity_id: light.licht_buro
  15.         state: 'off'
  16.     then:
  17.       - action: light.turn_on
  18.         metadata: {}
  19.         data: {}
  20.         target:
  21.           entity_id: light.licht_buro
  22.       - delay:
  23.           hours: 0
  24.           minutes: 1
  25.           seconds: 0
  26.       - action: light.turn_off
  27.         metadata: {}
  28.         data: {}
  29.         target:
  30.           entity_id: light.licht_buro
  31.     else:
  32.       - action: light.turn_off
  33.         metadata: {}
  34.         data: {}
  35.         target:
  36.           entity_id: light.licht_buro
  37. mode: restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement