climate_group
climate_group copied to clipboard
Target temperature should be rounded to climate's entity precision.
Currently, the target temperature of the climate_group will be the average of all entities target temperature. However, this becomes an issue if you want to change all temperature at once and it's not rounded as the system expects; you'll get an error.
Say you have a climate_group that is made of 3 entities; target are respectively, 19, 19 and 18. The average shows will therefore be: 18.66C
Now the precision used for each of those entity is 0.5C ; so attempting to modify the temperature of the group one, by clicking the up arrow will set the temperature to 18.6+0.5 = 19.16. This will cause an error.
The temperature reported must be rounded according to the max(precisions).
For now, I've made this change to round to the nearest .5C (as this is the precision my system allows)
self._target_temp = round(_reduce_attribute(filtered_states, ATTR_TEMPERATURE) * 2) / 2
I think this is related to https://github.com/daenny/climate_group/issues/32, would that also be a solution?
I believe so, this looks like another effect of the fact that the target temp of the group is an average of the target temps of the members of the group, when really it should be its own value that is then pushed out to the members of the group irrespective of the individual target temps.
self._target_temp = round(_reduce_attribute(filtered_states, ATTR_TEMPERATURE) * 2) / 2
Did't not work for me. Thermostat stop sync to each other. A group with 2 thermostat. Added your line in climate.py under "class ClimateGroup(ClimateEntity):", wrong place?
Currently, the target temperature of the climate_group will be the average of all entities target temperature. However, this becomes an issue if you want to change all temperature at once and it's not rounded as the system expects; you'll get an error.
Say you have a climate_group that is made of 3 entities; target are respectively, 19, 19 and 18. The average shows will therefore be: 18.66C
Now the precision used for each of those entity is 0.5C ; so attempting to modify the temperature of the group one, by clicking the up arrow will set the temperature to 18.6+0.5 = 19.16. This will cause an error.
The temperature reported must be rounded according to the max(precisions).
For now, I've made this change to round to the nearest .5C (as this is the precision my system allows)
self._target_temp = round(_reduce_attribute(filtered_states, ATTR_TEMPERATURE) * 2) / 2
@jyavenard Hi - where did you put this line in the code?
For now, I've made this change to round to the nearest .5C (as this is the precision my system allows)
self._target_temp = round(_reduce_attribute(filtered_states, ATTR_TEMPERATURE) * 2) / 2
This issue was tripping me up as well, thanks for this adjustment above, I've got it working how I like it.
Hi - where did you put this line in the code?
In case you never got the answer, it's in the .py file of the custom integration.