How do I re-enable Google Calendar after breaking it?

Clearly it doesn’t pay to forget to enter a category, as nobody will read the plea for help, so let’s try again…

I have had Google Calendar working for ages. I was doing something unrelated with Google and decided to clean up unused projects in the Google Developers Console. Of course I extended that to deleting the one I needed, and so obviously my calendars broke. The log was showing “deleted_client: The OAuth client was deleted”.

I created a new project, got the oAuth details, updated the config and rebooted. But I was still getting the same error. I copied it all to another HA instance on a different machine, and it worked. Some Googling suggested deleting “.google.token”. After doing so, I was pretty sure it was working that day (the token file got created again), but maybe I just checked the error went away. But as of now, it’s not working.

Further Googling suggested reusing the client id on two instances was a problem, so I created another one. I ensured that the token file was deleted along with any previous “google_calendars.yaml”, copied in the new client id and secret, and then restarted HA.

But still no go, and there is nothing in the log. Pulling my hair out now!

1 Like

Ah yes, I forgot to re-enable the API. All good now.

I’m having a similar problem. I’ve deleted the google.token file but it never gets recreated. My API is active but never any hits on it. Can’t for the life of me get HA to recreate another token file. Any ideas?

Anything showing up in the log?

I finally figured it out. After a reboot of my MacMini it seemed to have solved whatever problem I was having. I re-authorized the component and everything loaded fine. Thanks!