I would like generate a list (json format preferred, but yaml is fine too) of devices in a given HomeAssistant instance, with the associated entities and those entities’ entity_ids.
Ideally, I’d do this using the REST API detailed here: REST API | Home Assistant Developer Docs
However, the closest request I’ve seen in the documentation is GET /api/states/
, which would list state information for all entities, and those entities’ entity_id, but not which device each entity is associated with.
I’ve also looked at the alternative of the core.device_registry
and core.entity_registry
files in the .storage
folder. However, I do not see anything in those files that indicates which device an entity is associated with.
I am running HomeAssistant Container, on version 2022.8.6.
I appreciate any help in figuring out how to gather this information. Thank you!