Long time lurker, first time poster. I am working on an automation for the start of our school year. I have created a local calendar that I have put in all the days that my boys will be going to school. I want to use this automation to start with to be an alarm to wake them up in the morning on school days. I have gone through the whole year and added an All Day event with the message being their name. When I attempt to make an automation that would trigger on their name to turn on their lights gradually, it has not worked. I was curious if it is because I have the event setup as an all day event or if I should switch them to a time when school starts and offset for when they need to wake up. I was hoping to us the all day event to trigger other ideas down the road, but wanted to start with this. My automation looks like this:
alias: School Day - Kid1
description: ""
trigger:
- platform: time
at: "06:30:00"
condition:
- condition: template
value_template: |
{{ state_attr('calendar.school', 'all_day') and
state_attr('calendar.school', 'message') == 'Kid1' and
as_timestamp(state_attr('calendar.school', 'start_time')).strftime('%Y-%m-%d') == now().strftime('%Y-%m-%d') }}
alias: Check Event Title
action:
- data:
message: School Day Kid 1
action: notify.dad
- action: light.turn_on
metadata: {}
data:
transition: 120
brightness_pct: 100
target:
device_id: 1361f7d72de5b
mode: parallel
Any thoughts on what I should do different?