Enhance camp day automation by adding additional time trigger and refining condition checks for improved accuracy
This commit is contained in:
@@ -1242,6 +1242,8 @@
|
|||||||
at: "13:30:00"
|
at: "13:30:00"
|
||||||
- platform: time
|
- platform: time
|
||||||
at: "14:00:00"
|
at: "14:00:00"
|
||||||
|
- platform: time
|
||||||
|
at: "14:30:00"
|
||||||
- platform: time
|
- platform: time
|
||||||
at: "19:29:00"
|
at: "19:29:00"
|
||||||
condition:
|
condition:
|
||||||
@@ -1250,11 +1252,13 @@
|
|||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{{ 'no camp' in [
|
{{ 'no camp' in (
|
||||||
item.summary.lower()
|
state_attr('calendar.family_events', 'data')
|
||||||
for item in (state_attr('calendar.family_events', 'data') or [])
|
| selectattr('summary', 'defined')
|
||||||
if 'summary' in item
|
| map(attribute='summary')
|
||||||
] }}
|
| map('lower')
|
||||||
|
| list
|
||||||
|
) }}
|
||||||
action:
|
action:
|
||||||
- variables:
|
- variables:
|
||||||
messages:
|
messages:
|
||||||
@@ -1273,12 +1277,11 @@
|
|||||||
- service: notify.alexa_media
|
- service: notify.alexa_media
|
||||||
data:
|
data:
|
||||||
target:
|
target:
|
||||||
# - media_player.living_room
|
- media_player.living_room
|
||||||
# - media_player.declan_s_room
|
- media_player.jordyn_s_room
|
||||||
# - media_player.jordyn_s_room
|
- media_player.chloe_s_room
|
||||||
# - media_player.kitchen
|
- media_player.declan_s_room
|
||||||
# - media_player.tv_alexa
|
- media_player.kitchen
|
||||||
- media_player.parents_room
|
|
||||||
message: "{{ messages[now().strftime('%H:%M:%S')] }}"
|
message: "{{ messages[now().strftime('%H:%M:%S')] }}"
|
||||||
data:
|
data:
|
||||||
type: announce
|
type: announce
|
||||||
@@ -1377,11 +1380,13 @@
|
|||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{{ 'no camp' in [
|
{{ 'no camp' in (
|
||||||
item.summary.lower()
|
state_attr('calendar.family_events', 'data')
|
||||||
for item in (state_attr('calendar.family_events', 'data') or [])
|
| selectattr('summary', 'defined')
|
||||||
if 'summary' in item
|
| map(attribute='summary')
|
||||||
] }}
|
| map('lower')
|
||||||
|
| list
|
||||||
|
) }}
|
||||||
action:
|
action:
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data:
|
data:
|
||||||
|
|||||||
Reference in New Issue
Block a user