]> git.giorgioravera.it Git - homeassistant.git/commitdiff
updated notification for bticino and shelly and hacs firmware update
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Sat, 31 Aug 2024 12:05:56 +0000 (14:05 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Sat, 31 Aug 2024 12:05:56 +0000 (14:05 +0200)
packages/BTicino/bticino_main.yaml [new file with mode: 0644]
packages/BTicino/bticino_operations.yaml
packages/update/update_engine.yaml
packages/update/update_main.yaml
packages/update/update_types.yaml

diff --git a/packages/BTicino/bticino_main.yaml b/packages/BTicino/bticino_main.yaml
new file mode 100644 (file)
index 0000000..f0fcd27
--- /dev/null
@@ -0,0 +1,27 @@
+######################################################################
+# BTcino Customizations
+######################################################################
+
+homeassistant:
+  customize:
+
+    ######################################################################
+    # BTcino Customizations - General Package Settings
+    ######################################################################
+
+    package.bticino:
+      customize: &customize
+        package: 'bticino'
+        version: 0.0.5
+
+    ######################################################################
+    # BTcino Customizations - Entities
+    ######################################################################
+
+    group.bticino:
+      <<: *customize
+    script.bticino_upgrade:
+      <<: *customize
+      icon: mdi:package-up
+    automation.bticino_update_notification:
+      <<: *customize
index 73a933d328a9e1efbf00d175b4b49ad378d9384a..bef7dac4044155a507a8a18da746a2d8dc7e5ac3 100644 (file)
@@ -2,6 +2,25 @@
 # BTicino Package - Operations Script
 ######################################################################
 
+script:
+  ######################################################################
+  # BTicino: Upgrade
+  ######################################################################
+  bticino_upgrade:
+    alias: "BTicino: Aggiornamento Firmware Collettivo"
+    variables:
+      pending_update_list: >
+        {{ states.update
+          | selectattr('state','eq','on')
+          | selectattr('entity_id', 'in', states.group.bticino.attributes.entity_id)
+          | map(attribute='entity_id')
+          | list
+        }}
+    sequence:
+      - service: update.install
+        target:
+          entity_id: '{{ pending_update_list }}'
+
 automation:
   ######################################################################
   # BTicino: Update Notification
index c3f2e3e495fc7600c3013cbc99a2e8daabaa3db3..0f0c937b15dbcc4b1228effc120a4a56f160cc8e 100644 (file)
@@ -76,23 +76,43 @@ automation:
           notification_id: "update"
 
 ######################################################################
-# Update: Update all
+# Update: Update HACS
 # - update.install
 ######################################################################
 
-#  - alias: "Update: Aggiorna Tutto"
-#    id: "update_aggiorna_tutto"
-#
-#    variables:
-#      pending_update_list: >
-#        {{ states.update
-#          | selectattr('state','eq','on')
-#          | selectattr('entity_id', 'in', states.group.hacs.attributes.entity_id)
-#          | map(attribute='entity_id')
-#          | list
-#        }}
+#  - alias: "Update: Aggiorna HACS"
+#    id: "update_aggiorna_hacs"
 #
 #    trigger:
+#      - platform: state
+#        entity_id: input_button.update_hacs
 #
 #    action:
-#      - service: update.install
+#      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:
+    alias: "HACS: Aggiornamento Collettivo"
+    variables:
+      pending_update_list: >
+        {{ 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: '{{ pending_update_list }}'
index cbddce9148975f8a6329a2e3b9bdfe624115cd9c..5ed5ab7ad088216f9b9726a5612edfb5d26c3799 100644 (file)
@@ -18,15 +18,17 @@ homeassistant:
     # Update Package - Main - Entities
     ######################################################################
 
+    group.update:
+      <<: *customize
     input_boolean.update_hacs:
       <<: *customize
     input_boolean.update_shelly:
       <<: *customize
     input_boolean.update_bticino:
       <<: *customize
-    group.update:
-      <<: *customize
     automation.update_hacs_notification:
       <<: *customize
     automation.update_update_acknowledgment:
       <<: *customize
+    script.hacs_upgrade:
+      icon: mdi:package-up
\ No newline at end of file
index 1a631f4bfacb163119abfe0faa2fbdf5a0b90e95..5e3d91d289c33cb82967d5d1507828e19d5e2a27 100644 (file)
@@ -3,12 +3,6 @@
 ######################################################################
 
 input_boolean:
-  # Home Assistant
-  #update_homeassistant:
-  #  name: Aggiornamento Home Assistant
-  #  initial: off
-  #  icon: mdi:cellphone-arrow-down
-
   # HACS
   update_hacs:
     name: Aggiornamenti HACS