I created a sensor some years ago, likely in my configuration.yaml. Today, I can’t find where it is defined. In Developer Tools/States, I see the sensor. However a grep of everything in my Home Assistant files and a text search in my Node-Red add-on doesn’t tell me where the sensor is defined.
In Developer Tools, States, I click on “More Info” and get this:
When I click on “Settings”, I get this:
No surprise since it was originally created in configuration.yaml.
When I click on the meatball menu, then “Related”:
OK, it is in the MQTT Integration?
But it is not. I can’t find it in the integration either as a device or as an entity.
I think that MQTT message shows up for discovered MQTT sensors once you have any MQTT definitions in your config.yaml. So maybe it was auto-discovered?
Years ago it was defined in mqtt.yaml, itself included in configuration.yaml. But with 2023.4 this was depreciated and mqtt.yaml was deleted. The release notes indicate that these definitions are “now configured via the GUI.”
I don’t think the mqtt sensors that were configured in yaml were automatically migrated in the update. You may be able to create new ons in the UI but be sure and check your yaml files to find this device. I still have mqtt devices in yaml so this can still exist. I would start with the configuration.yaml then check any files that are included from there.
Yep, I understand what grep does, been a Linux user for about 20 years. I would still check the files though as it seems something is still hanging around.
Good luck.
I would expect to find it somewhere in my config folder, typically in a yaml file, because it does exist and contains accurate information. But where is it defined?
I did a grep of . in my configuration folder and everything under it looking for “Dexcom” or “trend” or “val” and it never presents. It’s an interesting mystery.
I have no issue with creating new sensors in ESPHome or in Node-Red or the Entities UI. My problem is that I rely on this missing sensor in automations and it is concerning that I can’t find where it is defined. What if a future core update deletes legacy entities that weren’t created through a UI or don’t have a unique ID?
If you look at my posts above, I have done exactly as the sticky says. Only that I do not get an edit window, I get:
And this is exactly what I would expect for an entity created in yaml. And, as I have said, I can’t find the entity in any file in any folder in my config folders.
Right, that means the entity is coming from yaml or another method that does not supply unique_id. This means it will not show up in the traditional entity lists in the integrations page. Like the days of old.