From 007cfbdbe3b55f2be72262d39a0cc40ac138dbcd Mon Sep 17 00:00:00 2001 From: Joshua King Date: Wed, 25 Jun 2025 10:17:07 -0400 Subject: [PATCH] Fix default handling in day camp automation and streamline input_boolean configuration --- custom_variables.yaml | 7 +++---- scripts.yaml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/custom_variables.yaml b/custom_variables.yaml index b969565..2b8a95b 100644 --- a/custom_variables.yaml +++ b/custom_variables.yaml @@ -1,5 +1,4 @@ # For day camp automation -input_boolean: - day_camp_today: - name: Day Camp Today - initial: off \ No newline at end of file +day_camp_today: + name: Day Camp Today + initial: off \ No newline at end of file diff --git a/scripts.yaml b/scripts.yaml index 9ffcafa..6d889a9 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -11,7 +11,7 @@ - conditions: - condition: template value_template: > - {{ events.events | selectattr('summary', 'search', 'Camp') | rejectattr('summary', 'search', 'No') | list | count > 0 }} + {{ events.events | default([]) | selectattr('summary', 'search', 'Camp') | rejectattr('summary', 'search', 'No') | list | count > 0 }} sequence: - service: input_boolean.turn_on target: