ESPHome naming convention -- How can I get the names I want?

I’m on esphome 2026.6.5 and HA 2026.7.2, and when I recompiled an Office Fan I once again got a complete mess of names. I think this is a change in HA 2026.7.2 but I can’t see anything in the release note (but I update HA monthly and don’t think this happened in 2026.6). [Update: see 2nd reply, not new]

Basically: my fan.office_fan became fan.office_office_fan

This after thinking I had it fixed months ago when it last did this.

I went through a bunch of different permutations of inputs and just cannot get reasonable names in all the right places, which of course the change just broke all my automations, scripts, node-red code, etc.

I get it – the powers that be inside on controlling my names in some “standard” way, but I am hoping someone can tell me how to defeat it other than manually going into the gui to change them.

I’d like to share my experiments, and hopefully someone can recommend a more proper way. Let me be specific:

I have an Office Fan (I also have a bunch of fans, each I’d like to name).
The fan has (among others) a light domain and fan domain entity.

My desire is that the device be Office Fan (so I can find it in esphome builder), but in particular that the entities be:

fan.office_fan
light.office_fan_light

I can get that with the trick in lines 1 and 4 of using a single space for the esphome attribute name, and using an empty or removed friendly name for the device. But when I do that, I get a display name in HA that is simply “Fan” and “Fan Light”.

No, I don’t care that it is implied by an associated area, when I have it pop up on a dashboard as a fan being on, I want it to say “Office Fan Light” not “Fan Light”.

So the best I can do now is use line 1 (or 4), then manually override the display names that HA uses. And this leaves the device name also confusingly just “Fan”.

Is there any way I can do this without manually changing every single entity and/or device name manually? That just seems so wrong, so I am hoping I am missing something.

In fact I’m hoping there is a way, as I do not see lots of other people screaming?!?

not necessarily screaming but there are lots of people unhappy with all the new forced naming conventions in HA and ESPHome.

Most aren’t saying too much because they know the devs don’t listen anyway.

I think the only way to get what you want is to manually override everything, unfortunately.

Well, I may have it wrong in the OP. I’m not sure it is new, as I found I made a change in a template.

One nice thing in esphome is you can declare an area. I had added that to my esphome yaml, and I think that drives a big difference as indicated on line 6 now added:

If I have esphome NOT include area, and make sure area is blank upon adoption into HA, then the entity names only get one “office”, AND the display name is right, I just have to then manually add the area later and NOT recreate ID’s after the area is added.

So I think I sort of can get what I want except I have to not have esphome pass in area, and I need to be very careful not to recreate ID’s once added.

Shesh…

It would be incredibly helpful to get a precise, complete definition of how entity names, display names and device names are actually named. I’ve found a lot of incomplete ones. I think part of people’s frustration is the need to do so much trial and error. Maybe an online “enter all the pieces that go into a name and we’ll tell you how the final names will appear”?

I know it’s rude to complain about free software and volunteers (except I pay nabu casa monthly), but this really could have been done better. Or explained better – I just can’t see what we got for all this trouble.

I felt the same, but then I enabled “Display Entity IDs in picker” on my user profile and then just let HA and ESPhome name things the way they want. I can still distinguish one device and its entities from another.

It would be even nicer if the algorithm didn’t change - even better would have been to not use the fragile name-mangling approach to generate ids, instead just use the device name and user-assigned ID. But there is a stated ideological position against that, but with no clear rationale to justify it.

Well, I agree. Or I think I do.

But in a long life of disagreeing with things people want to do (often including employees), I’ve found it is useful to ask “why do you want that”.

Sometimes I change my mind after discussion.

Sometimes they do.

Just telling them they were wrong rarely causes either.

Again that’s assuming there is a real desire to take others opinions into consideration.

Most of the time the users can’t even get the devs to respond at all to even start a dialogue in the first place. the vast majority of the time any attempt at a dialogue is just met with total silence. There’s not much anyone can do with that.