Hi,
I would like to send a REST GET-command to my HA.
It works for one entity:
/api/states/sensor.victron_vebus_out_l1_power_246
I got following answer:
{“entity_id”:“sensor.victron_vebus_out_l1_power_246”,“state”:“3970.0”,“attributes”:{“state_class”:“measurement”,“unit_of_measurement”:“W”,“device_class”:“power”,“friendly_name”:“Leistung Haus L1”},“last_changed”:“2026-04-28T11:31:22.079562+00:00”,“last_reported”:“2026-04-28T11:31:52.071868+00:00”,“last_updated”:“2026-04-28T11:31:22.079562+00:00”}
But I want to get the state of approx. 10 different entities.
sensor.victron_vebus_out_l1_power_246
sensor.victron_vebus_out_l2_power_246
sensor.victron_vebus_out_l3_power_246
sensor.victron_system_battery_power
switch.heizpatrone_l1
switch.heizpatrone_l2
switch.heizpatrone_l3
3 more…
Of course I can call 10 times a GET command for each entity but it doesn’t make a good impression.
ok, there is no information about get-command for multi-entities.
There is no other way to do this?
Can I collect all different states inside HA and ask this by one get command? If yes, how can I do this?
If any of the API’s endpoints provide an array of all of the points you want simultaneously, you can use curl in a command line sensor and dump the data in attributes. Then, you can create template sensors using the attributes to split up the data. That way, you only have one API call. This is what I do for stock prices.
(the “raw-endraw” block only exists to stop HA from evaluating the template before calling the command; if this template API is called outside of HA, e.g. via curl, then there should be no “raw-endraw”)
Sadly the webhook doesn’t return data, which makes sense. Recently I used a webhook to trigger an automation to send a JSON response to an endpoint on my calling system to return more complex (or composed) data.
I found a way with template call:
<>
tmpStr := ‘{{ [’ +
‘{’‘entity’‘:’‘l1_power’‘,’ +
‘’‘state’‘: states(’‘sensor.victron_vebus_out_l1_power_246’‘),’ +
‘’‘unit’‘: state_attr(’‘sensor.victron_vebus_out_l1_power_246’‘,’‘unit_of_measurement’‘)},’ +