New entity id naming and sub-devices: Should entiies use sub-device name?

Update: Sept 10, 2026. Both of these issues were apparently due to “deleted_entities” in core.entity_registry. HA was trying to be too helpful and restoring entity settings – even after explicitly deleting the device. I manually removed the entities related to this device from deleted_entities and re-added the device and everything came back as expected. :angry:

Previous UPDATE: I deleted the device from HA, and made sure I had areas and devices all setup in ESPHome and it’s assigning entity IDs as expected (w/o having to mangle the “name:” in YAML with a prefix). Looks good. I could probably remove the area, since it’s redundant and I don’t want the device name to just be “Fan”. (Or maybe I do…)

button.family_room_family_room_fan_button_1

I’m using a cc1101, remote_receiver and remote_transmitter to control a couple of fans. I use esphome->devices to create sub-devices, one for each fan. And I use packages to avoid repetitive sensors and switches.

When the sub-device entities are brought into HA they are prefixed with the parent device name, not the sub-device name.

Shouldn’t the entities get the sub-device name as the prefix? Or rather, is there a reason the entities shouldn’t use the sub-device name as the prefix?

Would this be an ESPHome integration change or a Home Assistant change? (Which is prefixing the device name?)

Where this would be extra helpful is when using packages and reuse code. That is, if this was in a package I wouldn’t need to add an additional prefix to the name like this:

binary_sensor:
  - platform: remote_receiver
    name: "{$room_name} Stop Button"
    device_id: "${room_name}_fan
    ...

Since I’m using packages with sub-devices it would be nice to set the device_id when including the package and avoid adding the same device_id to every block.

UPDATE: See top post.

Still seeing some odd things and wondering about the new entity naming.

This came up because an automation failed that I set up using the area name in the entity:

Referenced entities switch.back_bedroom_primary_bedroom_fan_fan are missing or not currently available

I just deleted the entire device. The device was discovered and I added it back in. Every device (including the parent device) showed an “area” when adding, as you can see:

But areas are not included on some devices:

Parent device entity, no area:

sensor.bedlight_and_fan_control_wifi_signal

Sub-device ‘Family Room Fan’, including area:

switch.family_room_family_room_fan_fan
sensor.family_room_family_room_fan_current_state

Sub-device ‘Primary Bedroom Fan’, missing area:

switch.primary_bedroom_fan_fan
sensor.primary_bedroom_fan_current_state

Then there’s a third sub-device, which is prefixing the parent device name:

switch.bedlight_and_fan_control_master_light_switch

This is my entity format setting, and I haven’t touched them:

BTW, surprised Spook didn’t alert me to the entity name issue.