Skip to content

Instantly share code, notes, and snippets.

@fwartner
Created April 23, 2024 08:36
Show Gist options
  • Save fwartner/cf2bdd5f8c837be4b5023185239de65a to your computer and use it in GitHub Desktop.
Save fwartner/cf2bdd5f8c837be4b5023185239de65a to your computer and use it in GitHub Desktop.
alias: "ESPHome: Update All Devices"
sequence:
- repeat:
for_each: >-
{{ states.update | selectattr('state', 'eq', 'on') |
map(attribute='entity_id') | select('in',
integration_entities('esphome')) | list }}
sequence:
- service: update.install
data: {}
target:
entity_id: "{{ repeat.item }}"
- wait_template: "{{ is_state(repeat.item, 'off') }}"
continue_on_timeout: true
mode: single
icon: si:esphome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment