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: