Single REST API Call for Multiple Entity States?

Hi folks,

As far as I can tell this one hasn’t been answered, but apologies if it has. Using the REST API (e.g., calling /api/states/<entity_id>), is it possible to get the states of multiple entities in a single request? I just need to aggregate data HASS already has into a single endpoint. Having a real hard time figuring this one out–thanks!

P.S. I know there’s the /api/states endpoint, but that seems really wasteful/bandwidth-intensive given the number of entities I have, especially given I may be polling this endpoint multiple times per minute.

Duplicate of API GET /api/states/<entity_id> with multiple entity_ids. I too would like to see this

You can create a custom/templated entity which has several attributes, each containing the state of the other devices/entities you want. Then you can just parse them out of the attributes array.

1 Like