From a85fb5ce81548b38208fb50d41f807a22b9436d6 Mon Sep 17 00:00:00 2001
From: ccostan <carlo@ipm.com>
Date: Sat, 18 Jul 2020 18:39:55 -0400
Subject: [PATCH] Updated Code for #797 - HACS notifications.

---
 config/packages/garadget.yaml |  1 +
 config/packages/hacs.yaml     | 10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/config/packages/garadget.yaml b/config/packages/garadget.yaml
index 03baf23d..5c499057 100755
--- a/config/packages/garadget.yaml
+++ b/config/packages/garadget.yaml
@@ -81,6 +81,7 @@ automation:
         data:
           topic: "garadget/GSmall/command"
           payload: "get-status"
+          
       - service: mqtt.publish
         data:
           topic: "garadget/GLarge/command"
diff --git a/config/packages/hacs.yaml b/config/packages/hacs.yaml
index 4807582f..a528bbfe 100755
--- a/config/packages/hacs.yaml
+++ b/config/packages/hacs.yaml
@@ -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 = [