Google Calendar Issues

Has anyone experienced delay in the change of the state of the calendar sensor i.e. calendar.xxxx ?

I have setup my event on my Google calendar say the start time is 9:20:00 and end time is 10:20:00. However in HA the state of my sensor from my calendar i.e. calendar.xxxx wont change to ‘on’ and will be delayed for a few minutes. I cannot get my head round this.

What am I doing wrong?

It’s no-where near instantaneous updates.

if thats the case then it defeats the purpose surely of having a calendar integrated with HA?!

How does HA get updated if there is change in time of an event or a new event for instance?

It’s a calendar, not a stopwatch. It does get updated within a matter of minutes.

I’m not sure this is true. I think the place you may get into trouble is if you have multiple back-to-back items on a single calendar. The calendar component checks with Google periodically (I believe it’s every 15 min) and gets the next event. Then it stores that info (attributes end_time and start_time) so that it can change the calendar sensor in a timely manner.

I have a couple events that trigger before the end (kids school stuff to remind me to pick them up at the end).

Thanks for your contribution @treno !!!

I will look into that thanks @ih8gates

Quick one how do you know the calendar component checks 15mins periodically?

Mostly from discussion on this forum. But GitHub confirms:

oh right ok.

can this not be changed from 15 minutes to say 2 minutes?

Not really. Not without replacing the component on your HA install.

But better planning may be able to get around it. The 15 minutes is just a matter of how often the component looks for new events. Are you creating new events and expecting them to immediately be sensed? That’s probably a bad use of the component. Better off doing something with something else (like Tasker on your phone…)

If you’re creating back-to-back events that are presenting a problem, you might consider creating additional timers that use the search attribute.

ok that makes sense then. I have been reading around that I could trigger the state of the sensor to ‘on’ by adding the offset option to my google_calendars.yaml file. Something like this:

- cal_id: xxxxx
  entities:
  - device_id: bachoo786
    name: Meeting
    track: true
    offset: "!!-2"

I use to have to modify the google component to get that to work. I haven’t had it working since the summer.

Right think I will give it a miss until it works again