Call Service - Calendar Events

Hi guys,

With the latest release of HA 2023.7 we are able to call a new calendar service. Of course, I had to try it out in the Node-RED as all my automations are running through it.

I’ve created a simple flow to test it out, but unfortunately, it is not working. When the service is called by inject node it returns API error. Can anyone help?

Example of my flow:

Error message:

"Call-service error. Service call requires responses but caller did not ask for responses"
1 Like

The call-service node needs to be modified for it to work with response data. If you would like to receive the response data with the current version, you can use the API node and make the call manually.

{
   "type": "execute_script",
   "sequence": [
       {
           "service": "calendar.list_events",
           "data": {
               "start_date_time": "2023-07-09 00:00:00",
               "end_date_time": "2023-07-15 00:00:00"
            },
           "target": {
               "entity_id": [
                   "calendar.events"
                ]
            },
           "response_variable": "service_result"
        },
       {
           "stop": "done",
           "response_variable": "service_result"
        }
    ]
}
10 Likes

Issue can be tracked here calendar.list_events: Service call requires responses but caller did not ask for responses · Issue #972 · zachowj/node-red-contrib-home-assistant-websocket · GitHub

2 Likes

Thank you for the link to the issue for tracking purposes and the workaround!

Is there a way to dynamically set the start and end dates to the current date and tomorrow?

1 Like