commit fa45a5608cfe28b4d566f69c8b7573efdf7c3eea parent 2dd6952ee95b91b202debae3d9b41b0a824d1cf6 Author: MTRNord <mtrnord1@gmail.com> Date: Fri, 16 May 2025 21:02:06 +0200 Fix the condition Diffstat:
| M | blueprints/automation/window_opened_status.yaml | | | 12 | +++++++----- |
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/blueprints/automation/window_opened_status.yaml b/blueprints/automation/window_opened_status.yaml @@ -57,14 +57,16 @@ triggers: hours: 0 minutes: 0 seconds: 30 + +variables: + window_entities: !input window_sensor actions: - choose: - conditions: - - condition: or - conditions: - - condition: state - entity_id: !input window_sensor - state: "on" + - condition: template + value_template: > + {% set open_windows = states | selectattr('entity_id', 'in', window_entities) | selectattr('state', 'eq', 'on') | list %} + {{ open_windows | length > 0 }} sequence: - action: climate.set_temperature target: