Device_id: entity_id: where to find

Hya,

where do i find device_id, entity_id for a given device or entity?

Thx in advance.

1 Like

under configuration, either devices or entities

image

I checked and it’s not there to be found.

1 Like

I think it’s in the URL.

21 Likes

The only way you can find this value is by looking in . storage/core. device_registry (or creating a Device Automation via the UI and examining the YAML it generates)

2 Likes

Many thanks! Helpful.

how to do this?

URL works for me! Thank you :slight_smile:

1 Like

Goto device page, in Automation div click plus button, choose “Do something when this device turns on or off” (or something like this). This will follow you to creating automation page with trigger on your device. Click three dots, choose “Edit in YAML” - you will see device_id and entity_id of this device.

7 Likes

The way you seem to find it is by clicking ‘MQQT INFO’

Seems to me, that the value in MQTT INFO is the IEEE address of the device.

From Terminal tool in home assistant browse to the folder using following command
cd /config/.storage
cat core.device_registry
screenshot below