Skip to content

Instantly share code, notes, and snippets.

@thejeffreystone
Last active November 4, 2022 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejeffreystone/00b18b50c2e3fe8d1b1e2a2b696f3aa1 to your computer and use it in GitHub Desktop.
Save thejeffreystone/00b18b50c2e3fe8d1b1e2a2b696f3aa1 to your computer and use it in GitHub Desktop.
webhook_automation
alias: Webhook Lock
description: ""
trigger:
- platform: webhook
webhook_id: door_lock
condition: []
action:
- service: input_text.set_value
target:
entity_id: input_text.bedroom
data:
value: "{{ trigger.json.event }}"
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.json.event == "unlocked" }}"
sequence:
- service:
- conditions:
- condition: template
value_template: "{{ trigger.json.event == "locked" }}"
sequence:
- service: ...
default: []
mode: restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment