I have manual created MQTT sensors and now get e.g.
The configuration for entity sensor.rasenmaher_modus_raw uses the deprecated option object_id to set the default entity id. Replace the "object_id": "rasenmaher_modus_raw" option with "default_entity_id": "sensor.rasenmaher_modus_raw" in your published discovery configuration to fix this issue or contact the maintainer of the integration that published this config to fix this. This will stop working in Home Assistant Core 2026.4
Depending on how this MQTT entity has been created.
If you did that manually, adjust the yaml configuration.
If it’s created by the device/software you are using, this software needs to be updated to support the new key (default_entity_id). Otherwise, even if you replace the old key manually in MQTT, it might be overwritten again.
The same error in the logs here after a reboot.
I see that almost all unique MQTT ID’s seem to change.
e.g. object_id: “eastron.L2L3_Voltage” changes to L2L3_Voltage"
Is there a way to keep the old object_id as unique identifier that is used in the dashboards?
Manually changing the ID of each one of 200 MQTT entities and renaming the same entity in every dashboard and statistics is no fun. It is like starting again complete from the beginning.
it should be enough to replace object_id with default_entity_id. I did that in one step with use of VSC.
However (unless I hallucinate - no, I’m not AI), while for mqtt entities the name alone assigned to default_entity_id is enough, for some reason templates require name prefixed by a domain,
for example
- name: Bobik Last Use Time
unique_id: bobik_last_use_time
default_entity_id: sensor.bobik_last_use_time
do you really have a dot in the entity identifier? Are you surrounding it with double quotas?
I tried search and replace object_id with default_entity_id but lost (invalidated) all MQTT objects in home assistant after saving and checking the configs.
I am looking for a easy way, with my hundeds of sensors and calculated sensors
Back again after doing some tests to see what works.
Yes, there are dots and double quotes, I see now adding the dots wasn’t the best choice.
As said using “default_entity_id” was a problem. What I didn’t saw in your example was the domain part “sensor.” before the entityname. After adding this sensor part to some test entities. With good results: the entity is not removed or changed and even the history stays intact. I think this could be a good and easy to implement solution.