]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Added script to update all components
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 16 Sep 2024 12:28:14 +0000 (14:28 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 16 Sep 2024 12:28:14 +0000 (14:28 +0200)
.storage/lovelace
.storage/lovelace.lovelace_settings
packages/BTicino/bticino_main.yaml
packages/BTicino/bticino_operations.yaml
packages/shelly/shelly_main.yaml
packages/shelly/shelly_operations.yaml
packages/update/update_engine.yaml
packages/update/update_main.yaml

index 3334ef7ba8c4ce668ac1f695acc22619ba8e6894..de9034dfa30cd79953d0c4a2519b7bff624bf801 100644 (file)
             {
               "type": "custom:badge-card",
               "badges": [
-                "person.giorgio",
-                "person.laura",
-                "device_tracker.ff590mr_device_tracker",
-                "sensor.time",
-                "binary_sensor.porta_casa_contact",
-                "binary_sensor.home_mode",
-                "binary_sensor.guard_mode",
-                "binary_sensor.speech_notifications",
-                "binary_sensor.alarms",
-                "binary_sensor.central_heating",
-                "sensor.shelly_em_channel_1_power",
-                "sensor.temperatura_balcone_temperature",
-                "sensor.temperatura_veranda_temperature"
+                {
+                  "entity": "person.giorgio",
+                  "show_entity_picture": true
+                },
+                {
+                  "entity": "person.laura",
+                  "show_entity_picture": true
+                },
+                {
+                  "entity": "device_tracker.ff590mr_device_tracker",
+                  "show_entity_picture": true
+                },
+                {
+                  "entity": "sensor.time"
+                },
+                {
+                  "entity": "binary_sensor.porta_casa_contact",
+                  "display_type": "minimal"
+                },
+                {
+                  "entity": "binary_sensor.home_mode",
+                  "display_type": "minimal"
+                },
+                {
+                  "entity": "binary_sensor.guard_mode",
+                  "display_type": "minimal"
+                },
+                {
+                  "entity": "binary_sensor.speech_notifications",
+                  "display_type": "minimal"
+                },
+                {
+                  "entity": "binary_sensor.alarms",
+                  "display_type": "minimal"
+                },
+                {
+                  "entity": "binary_sensor.central_heating",
+                  "display_type": "minimal"
+                },
+                {
+                  "entity": "sensor.shelly_em_channel_1_power"
+                },
+                {
+                  "entity": "sensor.temperatura_balcone_temperature",
+                  "display_type": "complete",
+                  "name": "Balcone"
+                },
+                {
+                  "entity": "sensor.temperatura_veranda_temperature",
+                  "display_type": "complete",
+                  "name": "Veranda"
+                }
               ]
             },
             {
           "path": "lights",
           "badges": [
             {
-              "entity": "light.luce_cucina"
+              "type": "entity",
+              "entity": "light.luce_cucina",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_corridoio"
+              "type": "entity",
+              "entity": "light.luce_corridoio",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_sala"
+              "type": "entity",
+              "entity": "light.luce_sala",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_divano"
+              "type": "entity",
+              "entity": "light.luce_divano",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_bagno"
+              "type": "entity",
+              "entity": "light.luce_bagno",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_specchio"
+              "type": "entity",
+              "entity": "light.luce_specchio",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_studio"
+              "type": "entity",
+              "entity": "light.luce_studio",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_camera"
+              "type": "entity",
+              "entity": "light.luce_camera",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_dispensa"
+              "type": "entity",
+              "entity": "light.luce_dispensa",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_balcone"
+              "type": "entity",
+              "entity": "light.luce_balcone",
+              "display_type": "complete"
             },
             {
-              "entity": "light.luce_veranda"
+              "type": "entity",
+              "entity": "light.luce_veranda",
+              "display_type": "complete"
             }
           ],
           "cards": [
           "path": "covers",
           "badges": [
             {
-              "entity": "sensor.tapparella_cucina"
+              "type": "entity",
+              "entity": "cover.tapparella_cucina",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.tapparella_sala"
+              "type": "entity",
+              "entity": "cover.tapparella_sala",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.tapparella_studio"
+              "type": "entity",
+              "entity": "cover.tapparella_studio",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.tapparella_camera"
+              "type": "entity",
+              "entity": "cover.tapparella_camera",
+              "display_type": "complete"
             }
           ],
           "cards": [
           "path": "people",
           "badges": [
             {
-              "entity": "person.giorgio"
+              "type": "entity",
+              "entity": "person.giorgio",
+              "show_entity_picture": true
             },
             {
-              "entity": "person.laura"
+              "type": "entity",
+              "entity": "person.laura",
+              "show_entity_picture": true
             },
             {
-              "entity": "person.anna"
+              "type": "entity",
+              "entity": "person.anna",
+              "show_entity_picture": true
             },
             {
-              "entity": "person.assunta"
+              "type": "entity",
+              "entity": "person.assunta",
+              "show_entity_picture": true
             }
           ],
           "cards": [
           "path": "alarms",
           "badges": [
             {
-              "entity": "binary_sensor.alarms"
+              "type": "entity",
+              "entity": "binary_sensor.alarms",
+              "show_entity_picture": false,
+              "display_type": "minimal"
             }
           ],
           "cards": [
               "entity": "sun.sun"
             },
             {
-              "entity": "sensor.valvola_cucina_temperature"
+              "type": "entity",
+              "entity": "sensor.valvola_cucina_temperature",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.valvola_sala_temperature"
+              "type": "entity",
+              "entity": "sensor.valvola_sala_temperature",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.valvola_bagno_temperature"
+              "type": "entity",
+              "entity": "sensor.valvola_bagno_temperature",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.valvola_studio_temperature"
+              "type": "entity",
+              "entity": "sensor.valvola_studio_temperature",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.valvola_camera_temperature"
+              "type": "entity",
+              "entity": "sensor.valvola_camera_temperature",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.temperatura_balcone_temperature"
+              "type": "entity",
+              "entity": "sensor.temperatura_balcone_temperature",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.temperatura_veranda_temperature"
+              "type": "entity",
+              "entity": "sensor.temperatura_veranda_temperature",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.temperatura_balcone_humidity"
+              "type": "entity",
+              "entity": "sensor.temperatura_balcone_humidity",
+              "display_type": "complete"
             },
             {
-              "entity": "sensor.temperatura_veranda_humidity"
+              "type": "entity",
+              "entity": "sensor.temperatura_veranda_humidity",
+              "display_type": "complete"
             }
           ],
           "cards": [
index 36e0a823f8abd9d487b349d84cb0c542b0c90165..76abbb274f4542a707420b2aac3e515259f58d39 100644 (file)
           "path": "config",
           "badges": [
             {
-              "entity": "binary_sensor.home_mode"
+              "type": "entity",
+              "entity": "binary_sensor.home_mode",
+              "display_type": "minimal"
             },
             {
-              "entity": "binary_sensor.guard_mode"
+              "type": "entity",
+              "entity": "binary_sensor.guard_mode",
+              "display_type": "minimal"
             },
             {
-              "entity": "binary_sensor.speech_notifications"
+              "type": "entity",
+              "entity": "binary_sensor.speech_notifications",
+              "display_type": "minimal"
             },
             {
-              "entity": "binary_sensor.text_notifications"
+              "type": "entity",
+              "entity": "binary_sensor.text_notifications",
+              "display_type": "minimal"
             },
             {
-              "entity": "binary_sensor.home_assistant_error"
+              "type": "entity",
+              "entity": "binary_sensor.home_assistant_error",
+              "display_type": "minimal"
+            },
+            {
+              "type": "entity",
+              "show_name": false,
+              "show_state": false,
+              "show_icon": true,
+              "entity": "group.update"
             }
           ],
           "cards": [
                     },
                     {
                       "entity": "sensor.server_giorgioravera_it_scadenza_del_certificato"
-                    },
+                    }
+                  ],
+                  "show_header_toggle": false,
+                  "title": "Informazioni Varie",
+                  "type": "entities"
+                }
+              ],
+              "type": "vertical-stack"
+            },
+            {
+              "cards": [
+                {
+                  "entities": [
                     {
                       "entity": "group.update"
                     },
                     {
-                      "entity": "sensor.hacs"
+                      "entity": "script.update_all"
+                    },
+                    {
+                      "entity": "script.hacs_update"
+                    },
+                    {
+                      "entity": "script.shelly_update"
+                    },
+                    {
+                      "entity": "script.bticino_update"
                     }
                   ],
                   "show_header_toggle": false,
-                  "title": "Informazioni Varie",
+                  "title": "Aggiornamenti",
                   "type": "entities"
                 }
               ],
               ]
             }
           ]
-        },
-        {
-          "title": "History",
-          "path": "s",
-          "icon": "mdi:history",
-          "type": "panel",
-          "badges": [],
-          "cards": [
-            {
-              "type": "custom:history-explorer-card",
-              "recordedEntitiesOnly": true
-            }
-          ]
         }
       ],
       "button_card_templates": {
index f0fcd27113fa131e2849391eac536d50254ba922..f4f36d7a46fdc165af063be39ae37548ad92aa13 100644 (file)
@@ -20,7 +20,7 @@ homeassistant:
 
     group.bticino:
       <<: *customize
-    script.bticino_upgrade:
+    script.bticino_update:
       <<: *customize
       icon: mdi:package-up
     automation.bticino_update_notification:
index bef7dac4044155a507a8a18da746a2d8dc7e5ac3..b38b62683459b51665621e67d010dc138f440afb 100644 (file)
@@ -4,9 +4,9 @@
 
 script:
   ######################################################################
-  # BTicino: Upgrade
+  # BTicino: Update
   ######################################################################
-  bticino_upgrade:
+  bticino_update:
     alias: "BTicino: Aggiornamento Firmware Collettivo"
     variables:
       pending_update_list: >
index 785d50740c6f688f8422f34b17e7dd9b2cf9576f..85f190326b6998ac7110c05078b0ea653829824c 100644 (file)
@@ -20,7 +20,7 @@ homeassistant:
 
     group.shelly:
       <<: *customize
-    script.shelly_upgrade:
+    script.shelly_update:
       <<: *customize
       icon: mdi:package-up
     script.shelly_reboot:
index f85c34f224dbef4ba0ef68702859d4b46db8e545..e9fd681b597cf1144350f45683721c1d91207464 100644 (file)
@@ -4,9 +4,9 @@
 
 script:
   ######################################################################
-  # Shelly: Upgrade
+  # Shelly: Update
   ######################################################################
-  shelly_upgrade:
+  shelly_update:
     alias: "Shelly: Aggiornamento Firmware Collettivo"
     variables:
       pending_update_list: >
index 0f0c937b15dbcc4b1228effc120a4a56f160cc8e..609f5aee229eed9bbebeb53c5523619d15e4c2c9 100644 (file)
@@ -75,34 +75,31 @@ automation:
         data_template:
           notification_id: "update"
 
-######################################################################
-# Update: Update HACS
-# - update.install
-######################################################################
-
-#  - alias: "Update: Aggiorna HACS"
-#    id: "update_aggiorna_hacs"
-#
-#    trigger:
-#      - platform: state
-#        entity_id: input_button.update_hacs
-#
-#    action:
-#      repeat:
-#        for_each: >
-#          {{ states.update
-#            | selectattr('state','eq','on')
-#            | selectattr('entity_id', 'in', states.group.hacs.attributes.entity_id)
-#            | map(attribute='entity_id')
-#            | list
-#          }}
-#        sequence:
-#          - service: update.install
-#            target:
-#              entity_id: "{{ repeat.item }}"
-
 script:
-  hacs_upgrade:
+  
+  ######################################################################
+  # Update: Update All
+  # - update.install
+  ######################################################################
+  update_all:
+    alias: "Update: Aggiornamento Collettivo"
+    variables:
+      pending_update_list: >
+        {{ states.update
+          | selectattr('state','eq','on')
+          | map(attribute='entity_id')
+          | list
+        }}
+    sequence:
+      - service: update.install
+        target:
+          entity_id: '{{ pending_update_list }}'
+
+  ######################################################################
+  # Update: Update HACS
+  # - update.install
+  ######################################################################
+  hacs_update:
     alias: "HACS: Aggiornamento Collettivo"
     variables:
       pending_update_list: >
index 5ed5ab7ad088216f9b9726a5612edfb5d26c3799..1e39c9e4aefb765571f3fb7d8f63b7c1a47982c6 100644 (file)
@@ -30,5 +30,7 @@ homeassistant:
       <<: *customize
     automation.update_update_acknowledgment:
       <<: *customize
-    script.hacs_upgrade:
-      icon: mdi:package-up
\ No newline at end of file
+    script.update_all:
+      icon: mdi:package-up
+    script.hacs_update:
+      icon: mdi:package-up