From: Giorgio Ravera Date: Sat, 31 Aug 2024 12:05:56 +0000 (+0200) Subject: updated notification for bticino and shelly and hacs firmware update X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=7658f592496cbab879ecd4abe187bf56e851df18;p=homeassistant.git updated notification for bticino and shelly and hacs firmware update --- diff --git a/packages/BTicino/bticino_main.yaml b/packages/BTicino/bticino_main.yaml new file mode 100644 index 00000000..f0fcd271 --- /dev/null +++ b/packages/BTicino/bticino_main.yaml @@ -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 diff --git a/packages/BTicino/bticino_operations.yaml b/packages/BTicino/bticino_operations.yaml index 73a933d3..bef7dac4 100644 --- a/packages/BTicino/bticino_operations.yaml +++ b/packages/BTicino/bticino_operations.yaml @@ -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 diff --git a/packages/update/update_engine.yaml b/packages/update/update_engine.yaml index c3f2e3e4..0f0c937b 100644 --- a/packages/update/update_engine.yaml +++ b/packages/update/update_engine.yaml @@ -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 }}' diff --git a/packages/update/update_main.yaml b/packages/update/update_main.yaml index cbddce91..5ed5ab7a 100644 --- a/packages/update/update_main.yaml +++ b/packages/update/update_main.yaml @@ -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 diff --git a/packages/update/update_types.yaml b/packages/update/update_types.yaml index 1a631f4b..5e3d91d2 100644 --- a/packages/update/update_types.yaml +++ b/packages/update/update_types.yaml @@ -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