MQTT device discovery lets a device or application describe all its components in one retained message on a single topic, homeassistant/device/<device_id>/config. That convenience had a nasty side effect. In several situations, removing a single component made Home Assistant clear the retained device message, and every other entity of the device went with it. Jan Bouwhuis fixed this in Core pull request #186084, merged on 14 October 2026 and assigned to the 2026.10.2 milestone, which is due on 16 October.
How a whole device disappeared
The bug report (#186066) was triggered by TeslaMate. After moving to device discovery, an application tidies up by sending empty payloads to its old single-component topics, such as homeassistant/sensor/<device_id>/<component>/config. For enabled entities Home Assistant already ignored such a conflicting message. For entities disabled by default, the cleanup path did not check which topic the message came from. The disabled entity was removed from the entity registry, and that made Home Assistant publish an empty retained payload to the entity's discovery topic. Under device discovery that topic is the device topic, so the entire device and all its components were removed.
The pull request lists other ways to the same result:
- removing a disabled component the documented way, by publishing the device payload with only the
platformoption for it; - deleting a single device-discovered entity in Home Assistant, for example in the UI;
- removing components from the device payload until only disabled ones were left, because disabled entities did not count towards keeping the device.
What changes
An empty payload on any topic other than the one an entity was discovered on is now ignored, and the log gets a warning that explains how to remove the component properly. Removing an entity from the registry clears the device discovery topic only when the device is removed as well. A device stays as long as it has an enabled entity or a disabled entity that came from device discovery. Disabled entities can only be updated through their own discovery topic, the same rule that already applied to loaded ones.
One behaviour takes getting used to. Home Assistant cannot remove a single component from a retained device payload, so an entity you delete in the UI comes back the next time the device or application publishes its configuration. To keep it away, disable the entity, or remove the component from the device's discovery payload at the source. Deleting the whole device, or sending an empty payload to the device discovery topic, still removes everything. A separate pull request (#49165) documents these rules.
Until you are on a version with the fix, do not delete individual entities of a device-discovered MQTT device: the pull request names exactly that as one of the ways to lose the whole device.