#Google Calendar events when WAN is down

1 messages · Page 1 of 1 (latest)

vast saddle
#

I have a Node-Red automation that calls calendar.get_events() just after midnight each day and uses that data to issue TTS notifications throughout the day. All of that works fine with our Google Calendar.

My problem is last night the internet was down from a storm, so the get_events() call returned a no events error. I realize Google Calendar is cloud based, but I expected the local Calendar service would at least still have all the recurring event data from the prior day, and it would work for at least those events. Is there no option to tell the .get_events() call to just return what it has in the local Calendar service if the call to Google fails? Could such an option be added? I'm trying to make all my automations resilient to WAN outages.

I suppose I could add a new automation to sync each Google Calendar with a Local calendar, and have my Node-Red flows look at the local calendar instead. But that's what I thought the Google Calendar integration already did, so that's why I'm asking her for clarification. Any advice or suggestion how to do this?

vast saddle
#

@somber sail would like to get your thoughts

somber sail
#

It already does what you say

#

unless you're using yaml config with search fields

somber sail
#

do you configure this from yaml with special features turned on? search disables local sync and requiers the cloud to issue searches. (I don't recommend using it)

vast saddle
#

No, it's pretty vanilla. Default config all from the UI. 3 google calendars setup. Get all the events for the next 24 hrs, keep in an in-memory list and tts them.

Is there something specific you want to see from the yaml configs?

The part that's odd, is from your description it should never return no events given all the recurring events, but yet it does when Internet WAN is down.

Maybe I'll turn on debug log, fake take the WAN down, and then wait and see what it shows.

In the meantime, the errors I saw from the time in question are:

#

From Node-Red add-on logs:

29 Jun 01:04:58 - [info] [debug:catch]
{
timestamp: 1751173498526,
arg: {
duration_hours: 24,
date: '2025-06-29',
start_time: '00:00:00',
end_time: '23:59:59'
},
parts: { id: '33de3b4d612195ad', count: 3, index: 1 },
payload: {
entity_id: 'calendar.my_reminders',
state: 'unavailable',
attributes: { friendly_name: 'My reminders', supported_features: 3 },
last_changed: '2025-06-28T21:59:46.486Z',
last_reported: '2025-06-28T21:59:46.486121+00:00',
last_updated: '2025-06-28T21:59:46.486Z',
context: {
id: '01JYW8VFHP1ZAE0VK94QSHSEW7',
parent_id: null,
user_id: null
},
timeSinceChangedMs: 25512045
},
_msgid: '6a2e73560d7053de',
error: {
message: 'HomeAssistantError: Service call requested response data but did not match any entities',
source: {
id: 'b1e5886cb3ba268f',
type: 'ha-api',
name: 'Events',
count: 1
},
stack: 'HomeAssistantError: Service call requested response data but did not match any entities\n' +
' at getErrorData (/config/node_modules/node-red-contrib-home-assistant-websocket/dist/common/errors/inputErrorHandler.js:43:13)\n' +
' at inputErrorHandler (/config/node_modules/node-red-contrib-home-assistant-websocket/dist/common/errors/inputErrorHandler.js:63:38)\n' +
' at ApiController._InputOutputController_preOnInput (/config/node_modules/node-red-contrib-home-assistant-websocket/dist/common/controllers/InputOutputController.js:69:51)'
}
}

#

In HA logs:
2025-06-29 01:04:58.775 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Error for call_service at pos 1: Service call requested response data but did not match any entities

somber sail
#

That error says there isn't an entity with the id

#

Have any other details about the health of the integration? It works normally otherwise?

#

I wonder if the entity goes unavailable when this happens. Can you see the state of the entity in the history?

#

The point being, it's not even calling into Google calendar integration here, something in home assistant doesn't find the entity

vast saddle
#

Ok, I'll dig into it and see if I can determine why.

#

The integration appears to work normally other than this one blip. Nothing else obvious in the logs.