I just installed an ESPHome-based LD2410 mmWave sensor. It works very well. All I did was copy/paste from the documentation. Now I’m going to modify it, but I want to understand some things first.
Question: (1) When I list the device information in the HA Web GUI, some of the entities are under the “diagnostics" tab and others in “configuration," but I look at the YAML that ESPHome processes, and I don’t specify anything should go under those tabs. Some magic must be doing it for me. What if I want to change the assignment or add more of my own?
(2) I notice that some entities have a device_class of “distance” and some as “%” but again, the YAML file does not specify. Is some magic reading the entity names and seeing “target distance” figure out this must be distance and then sees “battery voltage" and makes a guess at volts? Where is this guessing gone? It mostly guesses right. In one place, it guessed wrong and made my distances have units of inches. That is bizarre. What mmWave chip would measure inches?
If anyone can point me to the general direction of what to read, if it is source code in Git. I assume this guessing happens when an entity is added?
(3) I sware the I saw HA doing unit conversion because when I set the unts to CM from inches, the values got bigger by abut a factor of 2. But the docs say this is not done and units are just “dumb strings” with cosmetic effect only.


