mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-07-22 03:30:24 +00:00
Using a technique found in here: https://community.home-assistant.io/t/incoming-webhook-json-automation-help-needed/213881 #886
This commit is contained in:
parent
091085b701
commit
7329edcafa
@ -55,21 +55,19 @@ automation:
|
|||||||
|
|
||||||
- alias: 'Closed Github Issue'
|
- alias: 'Closed Github Issue'
|
||||||
id: cccd9bef-17d9-48ae-87e3-6cf883712779
|
id: cccd9bef-17d9-48ae-87e3-6cf883712779
|
||||||
mode: queued
|
mode: single
|
||||||
trigger:
|
trigger:
|
||||||
platform: webhook
|
platform: webhook
|
||||||
webhook_id: !secret github_webhook
|
webhook_id: !secret github_webhook
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: automation.closed_github_issue
|
||||||
|
attribute: last_triggered
|
||||||
|
above: 120
|
||||||
|
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >-
|
value_template: '{{- trigger.json.action in ["created", "closed", "opened", "reopened"] }}'
|
||||||
{%- if trigger.json.action == "created" or "closed" or "opened" or "reopened" %}
|
|
||||||
True
|
|
||||||
{%- elif trigger.json.action != "edited" or "labeled" or "unlabeled" or "pinned" or "unpinned" %}
|
|
||||||
False
|
|
||||||
{%- else -%}
|
|
||||||
False
|
|
||||||
{%- endif -%}
|
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: script.tweet_engine_image
|
- service: script.tweet_engine_image
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Loading…
x
Reference in New Issue
Block a user