Updated Code for #797 - HACS notifications.

pull/815/head
ccostan 5 years ago
parent 045489c655
commit a85fb5ce81

@ -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"

@ -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 = [

Loading…
Cancel
Save

Powered by TurnKey Linux.