Refactor check_day_camp script to simplify value_template formatting and enhance readability
This commit is contained in:
11
scripts.yaml
11
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:
|
||||
|
||||
Reference in New Issue
Block a user