Refactor check_day_camp script to simplify value_template formatting and enhance readability

This commit is contained in:
2025-06-25 15:47:47 -04:00
parent 4eecbe4589
commit 5e9cf011af

View File

@@ -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: