Closed MagieMalone closed 1 year ago
Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (google
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
google documentation google source (message by IssueLinks)
Hello, Same for me, i'm currently making tests, but a strange thing is that with my new events, it's not the case... i'll continue my searchs, but... interested of course if someone else find the solution earlier ;-)
Same issue here.
Idem. When I see the calendars in HA all seem OK except the calendar that I use for this integration. In the later all items are shifted an hour earlier after the new HA release was installed.
Hello I confirm the problem but it's not for all my events
Same here, some events fine, but most are an hour early since the DST period end (I don't think it has anything to do with 2011.11.1, I reckon the bug might have been already there with 2011.10.x - though not sure, we weren't home between the time change and 11.1), and all of these (recurring events) were added weeks, months ago.
In Google events follow each other hourly, except for a lunch break:
But in HA most of those an hour early:
Same here, some events fine, but most are an hour early since the DST period end (I don't think it has anything to do with 2011.11.1, I reckon the bug was already there with 2011.10.x), though of course all of these were added weeks, months ago.
In Google events follow each other hourly, except for a lunch break:
But in HA most of those an hour early:
Mine was working fine yesterday even after the clock change only had issue after update to 2022.11
Time shifted hour earlier in HA these are reoccurring events. My one off event seem to still be correct.
On top of the mentioned issue, I'm also facing the issue the the calendar in HA is not getting updated anymore... I've removed events from google that remain visible/present in HA calendar... Anyone having this behaviour as well ?
I am having the same issue of calendar offset, here’s what I have identified so far:
Same here seemed to break with the update to 2022.11.0 was correct the day before I upgraded. Seems to report correctly with any new event added but incorrectly with existing events
made a new recurring appointment, but that works correctly indeed, the same as a new single event. It's just the old already planned (in my case) recurring events. I can confirm it's not DST end, as the events on monday - thursday all went fine, only after I Installed 2022.11.1 yesterday the issue began.
Calendar had a large rewrite to sync and serve from local so that's definitely the issue. Wasn't a breaking change, but a bug here.
Thanks for the reports.
Due to some other issues, I've just restored my 2022.11.0 backup, checked the calendar and it was still the same. Proceeded to restore my 2022.10.5 backup and my calendar entries are now showing the correct time.
(I previously tried disabling the calendar(s) restarting HA 2022.11.1 and then reenabling them which didn't solve the issue)
Can someone give an example timezone this happens? Also curious if home assistant is in the same time zone or different time zone from the Google calendar timezone.
Having some of the raw debug from gcal_sync.auth
for one example event could help though may be private info that would need stripping.
I am in GMT - HA is set to GMT and Google shows the correct times when logging in directly
I'm on GMT+1, set both in Google calendar ( Central European Time - Amsterdam) and in HA (Europe/Amsterdam) and I see the issue.
i am in GMT+1 HA is set to GMT+1 and google GMT+1
I'm in GMT+1 zone, both in Google an HA.
Here is debug log from gcal_sync.auth. Sorry for it is quite long, as I have many calendars in Google, but I did not want to strip out anything that might be important. The only one used in HA is with its etag replaced to "zzzzzzzzzzzzzzz" in this log:
2022-11-04 13:41:44.793 DEBUG (MainThread) [gcal_sync.auth] response={'kind': 'calendar#calendarList', 'etag': '"p33sa17ufoaafm0g"', 'nextSyncToken': 'xxxxxxxxxxxxxx', 'items': [{'kind': 'calendar#calendarListEntry', 'etag': '"xxxxxxxx"', 'id': 'p#weather@group.v.calendar.google.com', 'summary': 'Időjárás', 'description': 'A lakóhelynek megfelelő napi időjárás-előrejelzés', 'timeZone': 'Europe/Budapest', 'summaryOverride': 'Weather', 'colorId': '15', 'backgroundColor': '#9fc6e7', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'reader', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"xxxxxxx"', 'id': 'realthk@gmail.com', 'summary': 'realthk@gmail.com', 'timeZone': 'Europe/Budapest', 'colorId': '14', 'backgroundColor': '#9fe1e7', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'owner', 'defaultReminders': [{'method': 'popup', 'minutes': 10}, {'method': 'email', 'minutes': 10}], 'notificationSettings': {'notifications': [{'type': 'eventCreation', 'method': 'email'}, {'type': 'eventChange', 'method': 'email'}, {'type': 'eventCancellation', 'method': 'email'}, {'type': 'eventResponse', 'method': 'email'}]}, 'primary': True, 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"xxxxxxxx"', 'id': 'xxxxxxxx4@group.calendar.google.com', 'summary': 'Fejlesztők', 'description': 'DM-os fejlesztői naptár', 'timeZone': 'Europe/Budapest', 'colorId': '15', 'backgroundColor': '#9fc6e7', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'owner', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"xxxxxxx"', 'id': 'hu.hungarian#holiday@group.v.calendar.google.com', 'summary': 'Ünnepnapok – Magyarország', 'description': 'Ünnepnapok és hagyományok – Magyarország', 'timeZone': 'Europe/Budapest', 'summaryOverride': 'Ünnepnapok – Magyarország', 'colorId': '7', 'backgroundColor': '#42d692', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'reader', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"xxxxxxx"', 'id': 'familyxxxxxxx@group.calendar.google.com', 'summary': 'Családi', 'timeZone': 'UTC', 'colorId': '17', 'backgroundColor': '#9a9cff', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'writer', 'defaultReminders': [{'method': 'popup', 'minutes': 10}, {'method': 'email', 'minutes': 10}], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"xxxxxxx"', 'id': 'xxxxxxxg@group.calendar.google.com', 'summary': 'Telefonhívások', 'timeZone': 'Europe/Budapest', 'colorId': '20', 'backgroundColor': '#cabdbf', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'owner', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"1623307964726000"', 'id': 'en.hungarian#holiday@group.v.calendar.google.com', 'summary': 'Holidays in Hungary', 'description': 'Holidays and Observances in Hungary', 'timeZone': 'Europe/Budapest', 'summaryOverride': 'Holidays in Hungary', 'colorId': '8', 'backgroundColor': '#16a765', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'reader', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"1646341642788000"', 'id': 'rkhhbddeifkbcik8pst5ipsq4jqj4s36@import.calendar.google.com', 'summary': 'https://www.f1calendar.com/download/f1-calendar_q_gp_alarm-20.ics?t=1582025642623', 'timeZone': 'UTC', 'colorId': '8', 'backgroundColor': '#16a765', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'reader', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"xxxxxxxx"', 'id': 'xxxxxxxxxx@group.calendar.google.com', 'summary': 'Családi események', 'timeZone': 'Europe/Budapest', 'colorId': '3', 'backgroundColor': '#f83a22', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'owner', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"zzzzzzzzzzzzzzz"', 'id': 'zzzzzzzzzzzzzzz@googlemail.com', 'summary': 'zzzzzzzzzzzzzzz@googlemail.com', 'timeZone': 'Europe/Budapest', 'colorId': '5', 'backgroundColor': '#ff7537', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'reader', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}, {'kind': 'calendar#calendarListEntry', 'etag': '"1667564698024000"', 'id': '5s59gaimrq1e2u9ej2qbeoru2o@group.calendar.google.com', 'summary': 'Magyar névnapok', 'timeZone': 'Europe/Budapest', 'colorId': '11', 'backgroundColor': '#fbe983', 'foregroundColor': '#000000', 'selected': True, 'accessRole': 'owner', 'defaultReminders': [], 'conferenceProperties': {'allowedConferenceSolutionTypes': ['hangoutsMeet']}}]}
@realthk thanks that helps. I realize the local calendar event data is also stored in config/.storage/google.xxxxx
so maybe you can also snag one event record that shows the problem and let me know the expected time and actual time.
Thank you all, hopefully we can get a quick fix out once I can reproduce.
Seems like the most likely thing for me to explore to reproduce is for a recurring event that crosses the daylight savings time boundary.
Exactly, @allenporter. The file from Google in .storage is a mess for human eyes, events with the same name occuring several times, I have to find the latest in effect, but it seems the problem is with crossing the DST boundary with a recurring event indeed.
For example, from my screenshot above "Isti" should be at 13:00, and because it was created in september, still during DST, it got GMT+2, which isn't valid anymore, after DST has ended, it should be GMT+1 now (but do not understand then why it works fine for those who restore HA version 2022.10.x...
"1ookvdm08gqvkheintf7u8folo": {
"id": "1ookvdm08gqvkheintf7u8folo",
"ical_uuid": null,
"summary": "Isti",
"start": {
"date": null,
"date_time": "2022-09-09T13:00:00+02:00",
"timezone": "Europe/Budapest"
},
"end": {
"date": null,
"date_time": "2022-09-09T14:00:00+02:00",
"timezone": "Europe/Budapest"
},
"description": null,
"location": null,
"transparency": "opaque",
"status": "confirmed",
"event_type": "default",
"visibility": "default",
"attendees": [],
"attendees_omitted": false,
"recurrence": [
"RRULE:FREQ=WEEKLY;BYDAY=FR"
],
"recurring_event_id": null,
"original_start_time": null
},
Thank you for confirming, i'll get started on trying to reproduce this with a test and working on a fix. No other data needed from users now, thank you all for your patience.
Also to answer your question about 2022.10
vs 2022.11
it's because I added a bug. The context is because in preparation for being able to create/delete calendar events in a future release(!) in the home assistant UI (including recurring events and a local calendar integration) we're now syncing events down to device and expanding them locally. This is instead of repeatedly polling the calendar data, we're now following best practices for efficient sync. However, this is a bug in the common library that handles the expansion logic.
I've reproduced the bug in the underlying gcal_sync
library https://github.com/allenporter/gcal_sync/pull/137 and will be pulling in a patch soon.
Wow that was fast thanks a lot. Great work.
Thanks a lot for all the work!
Indeed - many thanks for a good job. B.t.w. I love the Google Agenda solution and use it for many things. I find it one of the most handy and amazing things in my HA setup.
The problem
Google calendar start time seems to have become an hour earlier, while the calendar entry has not changed, after installing 2022.11.1
What version of Home Assistant Core has the issue?
core-2022.11.1
What was the last working version of Home Assistant Core?
core-2022.10.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
google calendar
Link to integration documentation on our website
https://www.home-assistant.io/integrations/google/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Time jumped an hour after installing 2022.11.1, however, release notes don't mention a breaking change.
I copy the attribute into a template sensor (see yaml snippet) and this show the change to an hour earlier:
Also in developer tools the time is an hour earlier then the actual calendar entry:
{{state_attr('calendar.alarm', 'start_time')}}
Result type: string 2022-11-07 05:30:00