From 302f98732c3dac0f06f022281ae14e159efbdecc Mon Sep 17 00:00:00 2001 From: 31c0fe9c6dbd74bcdde92e1d2aaa03e1d272f75f Date: Fri, 5 May 2023 17:25:34 +1000 Subject: [PATCH] Home Assistant Git Exporter --- config/packages/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/packages/meta.yaml b/config/packages/meta.yaml index f5bdf0c..92a8269 100644 --- a/config/packages/meta.yaml +++ b/config/packages/meta.yaml @@ -13,12 +13,14 @@ automation: | selectattr('state', 'eq', 'on') | selectattr('attributes.title', 'match', 'ESPHome') | selectattr('attributes.auto_update', 'eq', false) - | selectattr('attributes.in_progress', 'eq', false) | + | selectattr('attributes.in_progress', 'eq', false) | sort(attribute='attributes.installed_version') + | map(attribute='entity_id') | list }} + next_to_update: "{{ outdated_esp_items | first }}" - condition: - "{{ outdated_esp_items | count > 0 }}" - service: update.install target: - entity_id: "{{ outdated_esp_items[0].entity_id }}" + entity_id: "{{ next_to_update }}" mode: single