Updated Code for #797 - HACS notifications.

This commit is contained in:
ccostan 2020-07-18 18:39:55 -04:00
parent 045489c655
commit a85fb5ce81
2 changed files with 6 additions and 5 deletions

View File

@ -81,6 +81,7 @@ automation:
data: data:
topic: "garadget/GSmall/command" topic: "garadget/GSmall/command"
payload: "get-status" payload: "get-status"
- service: mqtt.publish - service: mqtt.publish
data: data:
topic: "garadget/GLarge/command" topic: "garadget/GLarge/command"

View File

@ -18,14 +18,14 @@ automation:
action: action:
- service: ifttt.trigger - service: ifttt.trigger
data_template: {"event":"GitPost", "value1":"There are {{ states.sensor.hacs }} updates to HACS components: {{state.sensor.hacs.attributes.repositories}}"} data_template: {"event":"GitPost", "value1":"Update to HACS: There are {{ states.sensor.hacs.state }} updates."}
- service: script.tweet_engine_image - service: script.tweet_engine_image
data_template: data_template:
tweet: > tweet: >-
Hey @CCostan - There are updates to {{ states("sensor.hacs") }} HACS components: Hey @CCostan - There are {{ states.sensor.hacs.state }} updates to HACS components:
{% for repo in state_attr("sensor.hacs","repositories") %} {%- for repo in state_attr("sensor.hacs","repositories") -%}
* {{repo['display_name'] }} {{ repo['installed_version'] }} -> {{ repo['available_version'] }} {{repo['display_name'] }} {{ repo['installed_version'] }} to {{ repo['available_version'] }}
{%- endfor %} {%- endfor %}
image: >- image: >-
{% set pictures = [ {% set pictures = [