Description of problem:
When adding Xiaomi multi sensors, three entities will be created.
E.g. kitchen, kitchen_2, kitchen_3. Other sensors probably follow a similar naming scheme.
Now, _2 and _3 are not very meaningful. HA knows the type and shows an appropriate icon (temperature, humidity, pressure). So how about using the type as the suffix instead of just numbers? E.g. kitchen_temperature, kitchen_humidity, kitchen_pressure.
That would make it much easier referencing entities and writing automations.
This is also especially important if you want to hide certain sensors from the UI (I use sensor.*_climate_pressure, as I don’t care about pressure).
I renamed them all manually, but whenever I add a new one, or also sometimes when I have to reconfigure the network/integration it will be back to _2 and _3.
I updated to Hassio 0.98.3 and then restarted.
Most of my sensors had then swapped entity names (wrong suffixes).
My Hue Motion Sensor temperature swapped with Lux sensor. That gave me temperatures over 1500 C.
Also some of my Xiaomi sensors swapped suffixes.
Sorry, it was just to point out the need for the entity suffixes.
And my problem is just like the issue by thowi that got closed and told it was a feature request.
So I did not want to start an issue when it was stated in this thread, that it was a feature request.
+1 to see this getting fixed. This is a serious issue and needs to be fixed before deconz can be a serious alternative in combination with homeassistant.
I was about to migrate all xiaomi sensors to deconz but this issue worries me. automations lovelace are all depending on device entity ids so they should never change
ughh, just had to reconnect deconz due to some new devices I added and new names were not generated using the adjusted names in deconz… suffixes switched and now my temp sensor in lovelace and the logger/recorder was showing the pressure sensor instead of the temp sensor.
edit: ok, I fixed this inside deconz. I renamed the temp, humidity and pressure enitities in deconz using the curl command. I now have three properly named entities in HA. Only thing is that they are grouped (this time) under the humidity sensor (when looking on the integration page). Names are correct though.
curl command:
curl -X PUT -d '{"name": "Multi {ROOM} Temperature"}' https://{SERVER}/api/{API}/sensors/{SENSOR_ID}
curl -X PUT -d '{"name": "Multi {ROOM} Humidity"}' https://{SERVER}/api/{API}/sensors/{SENSOR_ID}
curl -X PUT -d '{"name": "Multi {ROOM} Pressure"}' https://{SERVER}/api/{API}/sensors/{SENSOR_ID}
yup, renaming is ugly but thank god a onetime effort, and with a good texteditor not that hard to generate the code. Just replace the name and sensor id and you are good to go.
You are also right that this is actually a deconz issue as deconz is naming all “paired” sensors the same so this will never be corrected on HA side… It somewhat makes sense that the sensors are named the same but, at least for HA, that is a problem and I can only assume also for other home automation platforms that use the deconz api.
Im hoping that when v2 of deconz API comes out they have some kind of device attributes that will be the same for all sensors, then I can solve it easily in hass