When is the API service call going to return results?

The best native way to get all entries of a Calendar is to call the service calendar.list_events. To my surprise, the API does not support getting back the results of a service call:

This will call a service in Home Assistant. Right now there is no return value.

Does anyone know f there is a plan to have the API match the services calls evolution (the feature was introduced in 2023.7)? Maybe @allenporter would have some secret information? :slight_smile:

I have not looked at the websocket api here, as we’ve only changed was needed for core features so far. Check out what the frontend does in the developer tools, which creates a script with a response value.

Thank you for the follow up!

I managed to track the frontend up to https://github.com/home-assistant/frontend/blob/b8fcb9272a1320ef4449660913b52cc5f6e94b79/src/panels/config/automation/action/types/ha-automation-action-service.ts and then probably top https://github.com/home-assistant/frontend/blob/b8fcb9272a1320ef4449660913b52cc5f6e94b79/src/data/script.ts but I am lost at that point.

I see on https://github.com/home-assistant/frontend/blob/b8fcb9272a1320ef4449660913b52cc5f6e94b79/src/data/script.ts#L287 that the service is called via hass.callService but do not see where the response is used.

You may find it easier to use the browser developer tools to view the websocket message contents while using home assistant developer tools to call a service.