--- /dev/null
+######################################################################
+# 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
# 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
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 }}'
# 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
######################################################################
input_boolean:
- # Home Assistant
- #update_homeassistant:
- # name: Aggiornamento Home Assistant
- # initial: off
- # icon: mdi:cellphone-arrow-down
-
# HACS
update_hacs:
name: Aggiornamenti HACS