Milovski
(Jake)
September 7, 2023, 12:13pm
1
Error upon trying to save the below automation:
description: Piano Lessons
automation:
- alias: Piano Lessons
trigger:
- platform: calendar
entity_id: calendar.family
calendar_event.summary: Piano Lessons
event: start
- platform: calendar
entity_id: calendar.family
calendar_event.summary: Piano Lessons
event: end
action:
- if:
- '{{ trigger.event == ''start'' }}'
then:
- state: 'on'
else:
- state: 'off'
petro
(Petro)
September 7, 2023, 12:37pm
3
There’s a lot of things wrong with that automation. Where did you get it?
123
(Taras)
September 7, 2023, 12:39pm
4
What are you attempting to create because the example you posted isn’t a proper Automation or a Trigger-based Template Binary Sensor.
Milovski
(Jake)
September 7, 2023, 12:39pm
5
Here: Calendar - Home Assistant
And then attempted my own twist on it haha.
Thanks for the feedback though.
Milovski
(Jake)
September 7, 2023, 12:40pm
6
Basically just want my calendar.family state to change to on when this event starts and then off when it ends
123
(Taras)
September 7, 2023, 12:42pm
7
A calendar
entity’s state automatically changes to on
when one of its scheduled events starts. It changes to off
when the event ends.
Milovski
(Jake)
September 7, 2023, 1:09pm
8
I had an all day event today and it wasn’t set to “on” does this not apply to all day events?
123
(Taras)
September 7, 2023, 2:58pm
9
I have one scheduled event today, it’s an all-day event, and the calendar
entity’s state is on
.
The calendar
entity I have is produced by the Google Calendar integration . Are you using the same integration or are you using the CalDAV integration ?
Milovski
(Jake)
September 7, 2023, 10:25pm
10
My mistake, it does appear to be showing as on today.
I’ve realized my logic was flawed in what I was trying to achieve anyway (still learning).
End goal is for a picture card to display when our little one has piano lessons or library day, although I’ve set the condition to family.calendar: on, so both appear whenever the calendar is on rather than their individual event being on.