i found a nice way to export the entity id’s and names to a file
i have 2 homeassitants , and use remote assistant ( via hacs)
but when i gather entities from the remote node i always had to look and find the entityid instead of the entity name .
i exported a list as follows
- Go to Developer Tools → States (left sidebar)
- Right-click anywhere on the States page
- Select “Inspect” OR “Inspect Element” (F12 also works)
- Click “Console” tab at the top of the Inspector panel
- Paste the JavaScript code in the Console area
- Press Enter → ha_entities.csv downloads instantly!
// NAME = ENTITY_ID format + A-Z sort by NAME
let lines = [];
Object.values(document.querySelector('home-assistant').hass.entities)
.forEach(e=>{
if(e.name) lines.push(`${e.name.padEnd(30)} = ${e.entity_id}`);
});
lines.sort((a,b)=>a.toLowerCase().localeCompare(b.toLowerCase()))
.forEach(line=>console.log(line));
const txt = lines.join('\n');
const blob = new Blob([txt], {type: 'text/plain'});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url; a.download = 'ha_entities.txt'; a.click();
console.log('✅ ha_entities.txt downloaded!');