At the moment, sensor unique ids are computed using the partition and zone id. This means that the unique id is unique while running the gateway, but if changing panel and keeping the same configuration, zone ids might be reused / mixed / switched, and unique ids get moved around, confusing slightly home assistant.
If we were to use the ids of the sensors, which are unique by themselves, we would make sure that this situation does not happen. Moreover, previous identification of those sensors in home assistant would stay the same as the unique id would be matching.
Maybe with some normalization of the sensor id.
The question for this change: would it be a breaking change for qolsysgw? Since HA does not use the unique id as entity id, this should not be the case, but maybe HA would add a number at the end of the sensor name if it sees a new sensor with the same name, but a different unique ID ? This should be investigated before making any change in that sense.
At the moment, sensor unique ids are computed using the partition and zone id. This means that the unique id is unique while running the gateway, but if changing panel and keeping the same configuration, zone ids might be reused / mixed / switched, and unique ids get moved around, confusing slightly home assistant.
If we were to use the ids of the sensors, which are unique by themselves, we would make sure that this situation does not happen. Moreover, previous identification of those sensors in home assistant would stay the same as the unique id would be matching.
https://github.com/XaF/qolsysgw/blob/9737a932578bc0d85a716e1b73cbe2e0e3f2ac7e/apps/qolsysgw/mqtt/updater.py#L494-L496
Could thus become something like:
Maybe with some normalization of the sensor id. The question for this change: would it be a breaking change for
qolsysgw
? Since HA does not use the unique id as entity id, this should not be the case, but maybe HA would add a number at the end of the sensor name if it sees a new sensor with the same name, but a different unique ID ? This should be investigated before making any change in that sense.