Hi
I had the old method of Google Calendar installed monitoring a scheduler calendar.
It was set up so that I had a calendar entity for each different typical event.
e.g. Heating, sleeping, days, nights, wfh, holiday etc…
Happy days
Today it broke and all my entity calendars suddenly switched “on” when only one should have been.
So now I’m in the process of trying to transfer all my automations and template sensors over to the integrated Google calendar method.
Automations I can do, but I’m stuck when trying to update my template sensors as well as some YAML I used in my dashboard as I can only select the my_schedule calendar rather than per description.
Previously a template sensor would be on/off with the following code:
- sensor:
- name: house_is_sleeping
icon: >
mdi:sleep
state: >
{% if is_state('calendar.sleeping', 'on') %}
on
{% else %}
off
{% endif %}
Another Pre example, displaying when my heating is due to be active on on my dashboard
We were coming into a cold snap here so didn’t have the time to fiddle about with it. Needed my heating automations to work, so I gave up in the end and created a separate calendar for each schedule.
It’s a shame as it used to be great having everything neat in a single calendar.
So you are saying that each event is supposed to have their own sensor generated and that it is temporarily broken?
One of my instances is running an old version: 2021.7.4
WIth google configuration in configuration.yaml and not from the GUI
It still does not have a sensor for each event in one calendar. I know I have had this working before but not sure which version that was. Just started to try and get it up and running again.
When it worked I could access start time of the next event of a specific name like this:
states.calendar.event_name.attributes.start_time
So the sensors where based on the event name.
Now I have just calendar based sensor like:
states.calendar.calendar_name
And thus I have only access to the next upcoming event and none later
No event sensors generated in 2022.11.3 either with integrated Google Calendar service
Is there a config needed in order for event names to generate sensors?
I was talking about the search functionality that broke in 2022.11.0 and fixed in patch releases. I don’t recommend using the yaml search because of all the caveats, but it’s still there if you use google_calendars.yaml. I instead recommend using automation and a binary sensor template that matches the event start/event end events example though i want to make this a built in feature in the UI in the future.
# this sensor would now have the value 5 ( 6-1 )
sensor.timetotrash
I have had this available before but it is a while so I have no idea which version it was working in. Each event name in one calendar had a sensor populated by home assistant.
I have managed to check next available event if it is what I’m looking for but would like to be able to access data for events that are not the next in the calendar.
I’m sorry if I have missed some info you provided that would solve this.
They have all the info about the event, start, end, name etc.
So this is exactly what I was looking for.
I guess this is how I did it last time and lost the modified config file and just got the generated without additional config somewhere along the way.
That’s how I had mine. I’d followed SlackerLabs tutorial and it worked fine for me up until 2022.11.0
It would be great to merge things back to a single scheduler calendar again, but I’m hesitant to re-activate the google_calendars.yaml file just in case…