It does work well and I execute the commands and the state also gets updated. However, I would like to add also the battery soc as a sensor. The only way possible I found so far was to add it as a new sensor which will become it’s own entity. Is it possible to collect multiple entities in one device or somehow make this value accessible in the context of the lock?
So far I had to group all the entitities manually which is annoying if a device provides a lot of different sensors.
Unfortunately the mqtt auto discovery documentation is written in a very confusing way but after a few tries I think I managed to kinda get it right. However, I cannot solve the multi sensor issue mentioned above.
But how do I do that using autoconfiguation? Is that implicitly done by the topic? Or is it because they point to the same state topic and I have to merge the data into to the state? Or is it because of the payload configuration? Is there some more documentation that explains this a bit better?
I’m using this to make my devices autoconfig themselves in homeassistant, so I dont need to write extra configuration files.
thank you very much, I managed to get it working this way.
What I find a bit confusing is that every entity would have to post the same device information causing quite a bit of redundancy ,e.g. configuration url, name, etc. Also what happens if 2 devices provide the same identifiers entry but provide different configuration url/name, etc?
Makes sense, but I tried to understand the concept. It feels like the dependency is reversed somehow.
one device could have multiple entities, but currently it’s like an entity has a device but to work around that we give it a unique identifier so we can merge all the devices from the entities to one which has the same identifier.
More then 3 years ago, when I started with HA, there were no devices, only entities. When they added devices, they modified MQTT auto-discovery to create devices, but as you say, from the bottom up. You add a device to the MQTT entity, and if you want more then one MQTT entity to the same device, you have to add each MQTT entity to the same device.