Google Calendar Search for Event in new Integration?

Hi

With the news that Google Calendar Yaml is been depreciated in 2022.9. I cant see a way to do the search feature which is in the yaml code eg for the next event with “Birthday” in the Title or “Rugby Training”

I can create events in Integration/HA but the whole point of the search is that it automatically tells you the next event.

If anyone can help on how to do this, it would be appreciated.

Thanks

Martyn

Is this in release note somewhere, can you post a link as I have a lot of google calendars and this is worrying me now :grimacing:

The Documentation still states

The integration supports additional configuration from a file google_calendars.yaml which is available for existing users before version 2022.06 . This file is no longer automatically populated.

Yeah, its part of the new release yesterday on 2022.8

image

This is how I do my current searches in my calendar for next events.

Cant see how to do in the Integration and I assume its not possible as you need specific calendars like what the search would normally do for you.

Or have I just misread this and its just the actual logon credentials ?

Should have followed my instincts before replying.

Looks like its just the actual information in configuration.yaml and not the google_calendard.yaml

I just hashed out the following and rebooted and the new issue notification has now gone :slight_smile:

#google:

client_id: !secret calendar_id

client_secret: !secret calendar_secret

2 Likes

Yes, only config yaml is deprecated.

You can search without the Google calendars yaml, but you need to use automations. See the calendar integration eocs for examples of automations. A binary sensors template is the current simplest way.

See the calendar integration eocs for examples of automations.

I see no examples of automations that work as they do in google_calendars.yaml, in particular:

  • How to create a trigger that fires in the same way as events in a calendar with a search string.
  • How to read the offset value from a calendar item and use that to offset the trigger.

Are these still possible and/or is there any expectation that google_calendars.yaml itself will be deprecated in the future?

See Calendar - Home Assistant

  • The example Example: Calendar Event Light Schedule shows how to match text.
  • You can set offset in automations as shown in the example Calendar - Home Assistant – but no, you can’t read the offset value from the calendar item. The issue is that reading the offset value from the calendar item is buggy and error prone and it kind of works in some cases, but has too many caveats.

I am actively trying to get rid of google_calendars.yaml by finding other ways to support nearly all the same features. (e.g. Calendar event helper · Discussion #776 · home-assistant/architecture · GitHub)

2 Likes

Thankyou @allenporter, you’re doing great work!

1 Like

Thanks for the info, would’ve been so much easier if they’d just said that rather than make you think you needed a new solution for everything :crazy_face:

I was using the Google Calendar integration to control the heating in multiple rooms with one calendar - I have a calendar called Heating and in there the events are called Lounge 19, Kitchen 18 etc. with the room and temperature required in the event name.

There are then template entities which calculate when to activate the radiator valves in each room based on the start time of the event and the current temperature difference, so that the rooms are at the right temperature at the time the event starts.

Each room had an entity in google_calendars.yaml which created a pseudo-calendar for the room using the search attribute and the templates used the next event for the room to determine the required temperature/valve activation time. Now that it’s not possible to create these pseudo-calendars based on search terms and given that there can be two calendar events running at the same time in the Heating calendar (say, Kitchen 18 and Office 19) I can’t do this any more.

Is the current solution to this use-case to create new calendars for each room?

1 Like

Hi

I hadn’t noticed this had stopped working till you said but I used it for my kids sports matches and birthdays.

Must have missed this stopping working. If anyone finds a way to keep this going, please let me know :+1:

Hi

I worked it out last night.

You can create a new calendar within your main Google calendar on left hand side. This can only be done on a PC/laptop.

I created about 5 or 6 additional calendars and named 1 School Holidays and then moved the events by double clicking on them and changing which calendar it should appear in from the drop-down menu. There is an option to create calendar :calendar:

Remember to remove all your sub searching calendars you created in yaml in google-calendars.yaml

Reboot and the google-calendars.yaml adds all new calendars in there and also in home assistant.

It seems it just does next event and the search feature is gone now.

Hope that helps :+1:

Yeah I was hoping I could avoid having five different calendars when one worked well before. Oh well, I’ll get that set up later.

Is this from 2022.11? It’s a bug fixed in a patch release. The intent is the functionality should all still be there, though I am trying to kill the feature and replace it with one that works for all calendar integrations. (When I do manage to break it, you will have a UI prompt and more deprecation notice)

It’s with 2022.11.1. I was seeing all the sub-calendars have all events from the main calendar, which meant it looked like the search wasn’t working.

Yep, should be fixed now, sorry fort he confusion caused by this.

Will we still be able to use this setup once you’ve merged the calendar integrations together or should I keep the separate calendars?

The plan will likely be to remove usage of yaml, and provide similar functionality via UI that works for any calendar integration, and keep parity with what you can do today.

2 Likes

Currently I need to use the calendar yaml sensors as I use them in node red to check if an event is Currently active like what shift I’m on at work.

Also the sensors it creates work well with the time node so can use the start time attribute on the calendar events to trigger flows.

For example time node 50 minutes before my calendar event days start to preheat the car etc.

With the new way automation for calendar triggers doesn’t work in node red.

Thanks for the context., That Matches my understanding of the feature parity needed before.we can drop yaml. The current replacement you can do is make template sensors.thsr give you equivalent binary sensors functionality but it’s too hard to set up manually, so looking for a way to do this in the UI (e.f. a calendar event helper)