Hi, I have an automation in which I use Google calendar events to trigger turning on a thermostat. All is working, except that the Google calendar repeatedly becomes unavailable because it says that it is unable to authenticate because it misses a valid API key. However, it turns out that it authenticates regardless later on anyway, so it is unclear why the authentication fails sometimes. The annoying thing is that whenever an event occurs while the calendar is unavailable, the trigger never occurs (not even when the calendar comes back after it authenticates successfully later on). I have no idea why this problem occurs, whether something is wrong at my end, or whether there is a bug of some sort. Below a screenshot of the intermittent unavailability, and a post of the log that shows the error. Can anybody help me out?
Screenshot of calendar OFF(available)/unavailable:
Log entry (replaced some calendar identifiers with xxxx):
Logger: homeassistant.components.google.calendar
Source: helpers/update_coordinator.py:290
Integration: Google Calendar (documentation, issues)
First occurred: 4 November 2022, 05:18:40 (8 occurrences)
Last logged: 8 November 2022, 22:52:17
Error requesting Vlothuys data: Error connecting to API: Server disconnected
Error requesting Vlothuys data: Error connecting to API: [Errno 32] Broken pipe
Error requesting Vlothuys data: Unable to authenticate with API: 401, message='Unauthorized', url=URL('[https://www.googleapis.com/calendar/v3/calendars/[email protected]/events?maxResults=100&singleEvents=true&orderBy=startTime&fields=kind,nextPageToken,nextSyncToken,items(id,summary,description,location,start,end,transparency,eventType,visibility,attendees,attendeesOmitted)&timeMin=2022-11-08T04:18:12%2B00:00&timeMax=2022-11-08T04:33:13%2B00:00')](https://www.googleapis.com/calendar/v3/calendars/[email protected]/events?maxResults=100&singleEvents=true&orderBy=startTime&fields=kind,nextPageToken,nextSyncToken,items(id,summary,description,location,start,end,transparency,eventType,visibility,attendees,attendeesOmitted)&timeMin=2022-11-08T04:18:12%2B00:00&timeMax=2022-11-08T04:33:13%2B00:00%27))
Error requesting Vlothuys data: Unable to authenticate with API: 401, message='Unauthorized', url=URL('[https://www.googleapis.com/calendar/v3/calendars/[email protected]/events?maxResults=100&singleEvents=true&orderBy=startTime&fields=kind,nextPageToken,nextSyncToken,items(id,summary,description,location,start,end,transparency,eventType,visibility,attendees,attendeesOmitted)&timeMin=2022-11-07T23:36:39%2B00:00&timeMax=2022-11-07T23:51:40%2B00:00')](https://www.googleapis.com/calendar/v3/[email protected]/events?maxResults=100&singleEvents=true&orderBy=startTime&fields=kind,nextPageToken,nextSyncToken,items(id,summary,description,location,start,end,transparency,eventType,visibility,attendees,attendeesOmitted)&timeMin=2022-11-07T23:36:39%2B00:00&timeMax=2022-11-07T23:51:40%2B00:00%27))
Error requesting Vlothuys data: Unable to authenticate with API: 401, message='Unauthorized', url=URL('[https://www.googleapis.com/calendar/v3/calendars/[email protected]/events?maxResults=100&singleEvents=true&orderBy=startTime&fields=kind,nextPageToken,nextSyncToken,items(id,summary,description,location,start,end,transparency,eventType,visibility,attendees,attendeesOmitted)&timeMin=2022-11-08T09:51:41%2B00:00&timeMax=2022-11-08T10:06:42%2B00:00')](https://www.googleapis.com/calendar/v3/calendars/[email protected]/events?maxResults=100&singleEvents=true&orderBy=startTime&fields=kind,nextPageToken,nextSyncToken,items(id,summary,description,location,start,end,transparency,eventType,visibility,attendees,attendeesOmitted)&timeMin=2022-11-08T09:51:41%2B00:00&timeMax=2022-11-08T10:06:42%2B00:00%27))