From 5e9cf011af3a54c776fa2186954491fcc6a5e336 Mon Sep 17 00:00:00 2001 From: Joshua King Date: Wed, 25 Jun 2025 15:47:47 -0400 Subject: [PATCH] Refactor check_day_camp script to simplify value_template formatting and enhance readability --- scripts.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts.yaml b/scripts.yaml index 41339e9..7542326 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -5,13 +5,10 @@ check_day_camp: - conditions: - condition: template value_template: >- - {{ states('calendar.family_events') == 'on' - and 'camp' in (state_attr('calendar.family_events', 'message') - | default('') - | lower) - and 'no' not in (state_attr('calendar.family_events', 'message') - | default('') - | lower) }} + value_template: > + {{ states('calendar.family_events') == 'on' and + 'camp' in (state_attr('calendar.family_events', 'message') | lower) and + 'no' not in (state_attr('calendar.family_events', 'message') | lower) }} sequence: - service: input_boolean.turn_on target: