Refactor day camp automation conditions to use calendar events for improved accuracy
This commit is contained in:
@@ -1261,22 +1261,19 @@
|
|||||||
data:
|
data:
|
||||||
type: announce
|
type: announce
|
||||||
method: all
|
method: all
|
||||||
- id: '1744503044812'
|
|
||||||
alias: Check day camp daily
|
|
||||||
trigger:
|
|
||||||
- platform: time
|
|
||||||
at: '04:00:00'
|
|
||||||
action:
|
|
||||||
- service: script.check_day_camp
|
|
||||||
- id: '1744503044813'
|
- id: '1744503044813'
|
||||||
alias: Announce day camp preparation and pause TV
|
alias: Announce day camp preparation and pause TV
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: '08:30:00'
|
at: '08:30:00'
|
||||||
condition:
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.day_camp_today
|
entity_id: calendar.m365_family_events
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ 'camp' in (state_attr('calendar.family_events', 'message') | lower) and
|
||||||
|
'no' not in (state_attr('calendar.family_events', 'message') | lower) }}
|
||||||
action:
|
action:
|
||||||
- service: notify.alexa_media
|
- service: notify.alexa_media
|
||||||
data:
|
data:
|
||||||
@@ -1295,10 +1292,14 @@
|
|||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: '08:45:00'
|
at: '08:45:00'
|
||||||
condition:
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.day_camp_today
|
entity_id: calendar.m365_family_events
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ 'camp' in (state_attr('calendar.family_events', 'message') | lower) and
|
||||||
|
'no' not in (state_attr('calendar.family_events', 'message') | lower) }}
|
||||||
action:
|
action:
|
||||||
- service: notify.alexa_media
|
- service: notify.alexa_media
|
||||||
data:
|
data:
|
||||||
|
|||||||
Reference in New Issue
Block a user