home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.54k stars 29.47k forks source link

Google Calendar - Error communicating with API: Failed to parse component: 1 validation error for Event #121893

Closed AlexanderTurnowsky closed 1 month ago

AlexanderTurnowsky commented 1 month ago

The problem

i see this error starting from today. Did not really changed anything on HA. 3 of 4 calendars will nbe synced, but the main one gives an error. 024-07-13 10:52:28.592 ERROR (MainThread) [homeassistant.components.google.coordinator] Error fetching xxx@email.com data: Error communicating with API: Failed to parse component: 1 validation error for Event eventType value is not a valid enumeration member; permitted: 'default', 'outOfOffice', 'focusTime', 'workingLocation' (type=type_error.enum; enum_values=[<EventTypeEnum.DEFAULT: 'default'>, <EventTypeEnum.OUT_OF_OFFICE: 'outOfOffice'>, <EventTypeEnum.FOCUS_TIME: 'focusTime'>, <EventTypeEnum.WORKING_LOCATION: 'workingLocation'>])

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

core-2024.6.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Calendar

Link to integration documentation on our website

No response

Diagnostics information

config_entry-google-e66901dbd9215bcbe5827b3ac7b63a21 (1).json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

024-07-13 10:52:28.152 DEBUG (MainThread) [homeassistant.components.google.coordinator] Finished fetching Kalenderwochen data in 0.187 seconds (success: True)
2024-07-13 10:52:28.179 DEBUG (MainThread) [homeassistant.components.google.coordinator] Finished fetching Familie data in 0.214 seconds (success: True)
2024-07-13 10:52:28.234 DEBUG (MainThread) [homeassistant.components.google.coordinator] Finished fetching Geburtstage data in 0.269 seconds (success: True)
2024-07-13 10:52:28.276 DEBUG (MainThread) [homeassistant.components.google.coordinator] Finished fetching Feiertage in Österreich data in 0.311 seconds (success: True)
*024-07-13 10:52:28.592 ERROR (MainThread) [homeassistant.components.google.coordinator] Error fetching xxx@email.com data: Error communicating with API: Failed to parse component: 1 validation error for Event
eventType
  value is not a valid enumeration member; permitted: 'default', 'outOfOffice', 'focusTime', 'workingLocation' (type=type_error.enum; enum_values=[<EventTypeEnum.DEFAULT: 'default'>, <EventTypeEnum.OUT_OF_OFFICE: 'outOfOffice'>, <EventTypeEnum.FOCUS_TIME: 'focusTime'>, <EventTypeEnum.WORKING_LOCATION: 'workingLocation'>])**

Additional information

No response

fnorman22 commented 1 month ago

I'm getting the same error here (running 2024.6.3), but I get an additional message in the log that I'm not sure whether it is relevant or not:

2024-07-13 13:31:43.160 INFO (MainThread) [homeassistant.components.google.config_flow] Successfully authenticated 2024-07-13 13:31:43.311 INFO (MainThread) [homeassistant.components.calendar] Setting up google.calendar 2024-07-13 13:31:43.485 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new calendar.google entity: calendar.REDACTED 2024-07-13 13:31:43.759 ERROR (MainThread) [homeassistant.components.google.coordinator] Error fetching REDACTED data: Error communicating with API: Failed to parse component: 1 validation error for Event eventType value is not a valid enumeration member; permitted: 'default', 'outOfOffice', 'focusTime', 'workingLocation' (type=type_error.enum; enum_values=[<EventTypeEnum.DEFAULT: 'de 2024-07-13 13:32:11.386 DEBUG (SyncWorker_29) [homeassistant.components.google] Error reading calendar configuration: [Errno 2] No such file or directory: '/config/google_calendars.yaml' 2024-07-13 13:32:11.390 INFO (MainThread) [homeassistant.components.calendar] Setting up google.calendar 2024-07-13 13:32:11.682 DEBUG (SyncWorker_20) [homeassistant.components.google] Error reading calendar configuration: [Errno 2] No such file or directory: '/config/google_calendars.yaml' 2024-07-13 13:32:11.985 ERROR (MainThread) [homeassistant.components.google.coordinator] Error fetching REDACTED data: Error communicating with API: Failed to parse component: 1 validation error for Event eventType value is not a valid enumeration member; permitted: 'default', 'outOfOffice', 'focusTime', 'workingLocation' (type=type_error.enum; enum_values=[<EventTypeEnum.DEFAULT: 'default'>, <EventTypeEnum.OUT_OF_OFFICE: 'outOfOffice'>, <EventTypeEnum.FOCUS_TIME: 'focusTime'>, <EventTypeEnum.WORKING_LOCATION: 'workingLocation'>]) 2024-07-13 13:32:11.986 DEBUG (MainThread) [homeassistant.components.google.coordinator] Finished fetching REDACTED data in 0.298 seconds (success: False)

For context, the log covers me trying to re-add the integration, followed by an reload of the integration. It has started give the error just a couple of days ago, with no changes on the HA configuration or any updates this whole week. image

Schonhoffer commented 1 month ago

I have the same. Seems very similar to this last issue, but the error message is slightly different https://github.com/home-assistant/core/issues/114072

Error fetching Calendar data: Error communicating with API: Failed to parse component: 1 validation error for Event eventType value is not a valid enumeration member; permitted: 'default', 'outOfOffice', 'focusTime', 'workingLocation' (type=type_error.enum; enum_values=[<EventTypeEnum.DEFAULT: 'default'>, <EventTypeEnum.OUT_OF_OFFICE: 'outOfOffice'>, <EventTypeEnum.FOCUS_TIME: 'focusTime'>, <EventTypeEnum.WORKING_LOCATION: 'workingLocation'>])

fnorman22 commented 1 month ago

Yesterday I've updated HA to 2024.7.2 and the issue seems to be resolved. On the changelog there are a couple of updates on gcal_sync, which possibly did the trick.

Schonhoffer commented 1 month ago

Updating to 2024.7.2 also resolved my issue

home-assistant[bot] commented 1 month 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!

Code owner commands Code owners of `google` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign google` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


google documentation google source (message by IssueLinks)

allenporter commented 1 month ago

Yes dupe of #114072 which was fixed in 2024.7