I have checked the home assistant documentation page for API's. I could not get and endpoint that would return a list of created areas(kitchen, living room etc) or a list of all my devices.
Is there a way to achieve this?
I have checked the home assistant documentation page for API's. I could not get and endpoint that would return a list of created areas(kitchen, living room etc) or a list of all my devices.
Is there a way to achieve this?
You can do this via the REST /api/template
endpoint:
curl -H 'Authorization: Bearer abc123' '<instance url>/api/template' -d '{"template": "{{ areas() }}"}'
Be sure to check out the REST API documentation, particularly on how to get the bearer token. You may find the templating documentation useful as well.