I use Google calendars to do all sorts of automation (greetings, outdoor lighting, etc) in Home Assistant but I’m running into an issue that despite the start/end times looking correct the calendars/events turn “off” at 5PM (midnight GMT).
I confirmed my server has “time_zone: America/Los_Angeles” in configuration.yaml and the Google Calendars in question are set to GMT -7 (Pacific).
Sunset is now ~8PM so when my outdoor lights go on and check if they should be a special color the event has already ended because it’s after 5PM when the calendars go “off”. Has anyone else run into/resolved this?
Edit: Added Screenshots
HA calendar last night ending at 5:05 PM for all day event & showing today’s “all day” event
return dt.datetime.now(time_zone or DEFAULT_TIME_ZONE)
At 5:05PM PDT it seems like HA is querying for events starting at 12:05AM GMT which seems like it may not include all day events in the user’s time zone (previous day). Can this issue be resolved by adding the default timezone to params['timeMin'] = dt.now().isoformat('T') call in https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/google/calendar.py#L115 so the call to Google Calendar is using the user’s localized date instead of UTC?
No action from me was required to resolve this. Things magically resolved on their own eventually – I wasn’t sure if it was an API change on the Google calendar side or something changing in HA to fix it.