penright

Untitled

Apr 21st, 2022 (edited)
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.80 KB | None | 0 0
  1.  - alias: Shop Unlock From Click
  2.     id: Shop Unlock From Click
  3.     trigger:
  4.       - platform: mqtt
  5.         topic: "zigbee2mqtt/0x00124b0025143172"
  6.         value_template: "{{ value_json.action }}"
  7.         payload: "single"
  8.     condition: []
  9.     action:
  10.       - wait_for_trigger:
  11.           - platform: mqtt
  12.             topic: "zigbee2mqtt/0x00124b0025143172"
  13.             value_template: "{{ value_json.action }}"
  14.             payload: "double"
  15.         timeout: "00:00:05"
  16.         continue_on_timeout: false
  17.       - service: input_boolean.turn_off
  18.         entity_id: input_boolean.shop_lock
  19.  
  20.  
  21.     # - platform: mqtt
  22.       # topic: "zigbee2mqtt/0x00124b0025143172"
  23.     # condition:
  24.       # - condition: template
  25.         # value_template: "{{ trigger.payload_json['action'] == 'single' }}"
  26.  
  27.  
Add Comment
Please, Sign In to add comment