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:
topic: "garadget/GSmall/command"
payload: "get-status"
- service: mqtt.publish
data:
topic: "garadget/GLarge/command"

View File

@ -18,14 +18,14 @@ automation:
action:
- 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
data_template:
tweet: >
Hey @CCostan - There are updates to {{ states("sensor.hacs") }} HACS components:
{% for repo in state_attr("sensor.hacs","repositories") %}
* {{repo['display_name'] }} {{ repo['installed_version'] }} -> {{ repo['available_version'] }}
tweet: >-
Hey @CCostan - There are {{ states.sensor.hacs.state }} updates to HACS components:
{%- for repo in state_attr("sensor.hacs","repositories") -%}
{{repo['display_name'] }} {{ repo['installed_version'] }} to {{ repo['available_version'] }}
{%- endfor %}
image: >-
{% set pictures = [