Last active
February 23, 2024 18:51
-
-
Save blindguynar/c083930681c9d9278f8144dc1e4a4f45 to your computer and use it in GitHub Desktop.
automated shelly FW updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias: "Update: Shelly Devices" | |
| description: "" | |
| trigger: | |
| - platform: template | |
| value_template: >- | |
| {{ integration_entities('shelly') | select('match', '^update.') | | |
| select('is_state', 'on') | list | count > 0 }} | |
| condition: [] | |
| action: | |
| - repeat: | |
| for_each: >- | |
| {{ states.update | selectattr('state', 'eq', 'on') | | |
| map(attribute='entity_id') | | |
| select('in',integration_entities('shelly')) | list }} | |
| sequence: | |
| - service: update.install | |
| data: {} | |
| target: | |
| entity_id: "{{ repeat.item }}" | |
| - wait_template: "{{ is_state(repeat.item, 'off') }}" | |
| continue_on_timeout: true | |
| mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment