dave-code-ruiz / uhomeuponor

Custom Component to connect Home Assistant with Uhome Uponor Smatrix App
MIT License
19 stars 7 forks source link

Add unique id's for all entities #4

Closed LordMike closed 4 years ago

LordMike commented 4 years ago

Fixes #3

This change adds unique_ids to all entities, ensuring they're registered in the Entity registry. Once they are that, changes made by users will persist across HA restarts. As it is now, I cannot change the sensor name of any sensor made by this integration, as the change would be lost (HA also disallows it for this reason).

For unique id's, I've used the thermostats logical positions within controllers and connections. An example name is controller1_thermostat4. The prefix is used, so it ends up being PREFIXcontroller1_thermostat4_temp for the temperature sensor at controller 2, thermostat 5.

With this change, my entity registry looks like this.

image