Skip to content

Instantly share code, notes, and snippets.

@blindguynar
Last active February 23, 2024 18:51
Show Gist options
  • Select an option

  • Save blindguynar/c083930681c9d9278f8144dc1e4a4f45 to your computer and use it in GitHub Desktop.

Select an option

Save blindguynar/c083930681c9d9278f8144dc1e4a4f45 to your computer and use it in GitHub Desktop.
automated shelly FW updates
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