]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Fix Spaces in the shelly update notification
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Sat, 12 Nov 2022 15:33:20 +0000 (16:33 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Sat, 12 Nov 2022 15:33:20 +0000 (16:33 +0100)
automations/update_notifications.yaml

index 48d25dd1b404aeecf9e7003c8f30abeae78b5173..7c6666872e0113201ed7a28a79e057c69676ab35 100644 (file)
       data_template:\r
         title: "Shelly - Aggiornamento"\r
         message: >\r
-          "Sono disponibili aggiornamenti per i dispositivi Shelly:"\r
-          {% for entity_id in states.group.shelly.attributes.entity_id %}\r
+          Sono disponibili aggiornamenti per i dispositivi Shelly:\r
+          {%- for entity_id in states.group.shelly.attributes.entity_id -%}\r
             {% if is_state(entity_id, 'on') %}\r
-              -> {{ state_attr(entity_id, 'friendly_name')|replace(" - Aggiornamento Firmware", "") }}: {{ state_attr(entity_id, 'latest_stable_version') }}\r
-            {% endif %}\r
-          {%- endfor %}\r
+              -> {{ state_attr(entity_id, 'friendly_name')|replace(" - Aggiornamento Firmware", "") }}: {{ state_attr(entity_id, 'latest_version') }}\r
+            {%- endif -%}\r
+          {%- endfor -%}\r
         notification_id: "update"\r
         enable_persistent: true\r
 \r