Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_boolean:
- shop_lock:
- name: 'Shop is Lock'
- automation:
- - alias: Shop Unlock From Click
- id: Shop Unlock From Click
- trigger:
- - platform: mqtt
- topic: "zigbee2mqtt/0x00124b00xxxx"
- condition:
- - condition: template
- value_template: "{{ trigger.payload_json['action'] == 'single' }}"
- action:
- - wait_for_trigger:
- - platform: mqtt
- topic: "zigbee2mqtt/0x00124b0xxxx"
- - choose:
- - condition: template
- value_template: "{{ trigger.payload_json['action'] == 'double' }}"
- timeout:
- seconds: 5
- continue_on_timeout: false
- - service: input_boolean.turn_off
- entity_id: input_boolean.shop_lock
- - alias: Shop lock From Click
- id: Shop Lock From Click
- trigger:
- - platform: mqtt
- topic: "zigbee2mqtt/0x00124bxxxxx"
- condition:
- - condition: template
- value_template: "{{ trigger.payload_json['action'] == 'long' }}"
- action:
- - service: input_boolean.turn_on
- entity_id: input_boolean.shop_lock
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement