Skip to content

[BUG] MQTT Entity ID* Sensor.unnamed_device_ #2300

@GerritPost

Description

@GerritPost

Describe the bug
every sensor and button provided by MQTT does not have an entity ID in home assistant. so a default is set for e.g. unnamed_device_27

default_entity_id, causes this issue.

To Reproduce
Used https://mqtt-explorer.com/ software to debug

MQTT Explorer response from the battery emulator (notice the default_entity_id) :

{"name":"Battery Cell Voltage 2","default_entity_id":"be_battery_voltage_cell2","unique_id":"BEbe__battery_voltage_cell2","device_class":"voltage","state_class":"measurement","state_topic":"BE/spec_data","unit_of_measurement":"V","value_template":"{{ value_json.cell_voltages[1] }}","device":{"identifiers":["battery-emulator"],"manufacturer":"DalaTech","model":"BatteryEmulator","name":"Battery Emulator"},"availability":[{"topic":"BE/status"}],"payload_available":"online","payload_not_available":"offline","enabled_by_default":true}

Results in: unnamed_device_27

When I modify it with MQTT Explorer back to object_id

{"name":"Battery Cell Voltage 2","object_id":"be_battery_voltage_cell2","unique_id":"BEbe__battery_voltage_cell2","device_class":"voltage","state_class":"measurement","state_topic":"BE/spec_data","unit_of_measurement":"V","value_template":"{{ value_json.cell_voltages[1] }}","device":{"identifiers":["battery-emulator"],"manufacturer":"DalaTech","model":"BatteryEmulator","name":"Battery Emulator"},"availability":[{"topic":"BE/status"}],"payload_available":"online","payload_not_available":"offline","enabled_by_default":true}

The result is: Entity ID* battery_emulator_battery_cell_voltage_2

Notice! I did not used MQTT before the change object_id TO default_entity_id
Because HA never had these sensors before, and this a 'new' connection. I assume this causes issues for me, not for other users that are updated their software.
#2174

Expected behavior
A usable Entity ID

Screenshots
If applicable, add screenshots to help explain your problem.

using default_entity_id:

Image

Using object_id:
Image

An overview of sensors in HA

Image

Version and settings (please complete the following information):

  • Please attach screenshot of configuration for easier debugging
  • Software version: 10.7.0
  • Battery used: BMW i3
  • Inverter communication protocol: BYD Battery-Box HVS
  • Hardware used for Battery-Emulator: LilyGo T-CAN
  • GPIO controlled contactors: yes
  • MQTT: yes

Home Assistant OS Core 2026.5.0
Supervisor 2026.04.2
Operating System 17.3
Frontend 20260429.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions