I have encountered this problem: the climate device is reading the current temperature and targeting the temperature. But there are devices that have different scale of these temperatures.
I am ready to make a Pull Request, at my work I have already fixed it in a simple way. For PR of course I want to do qualitatively. And I see that the scale is performed in the entity.py file common for all kinds of devices. What is the best way to make custom scales for ccrent_temp_scale, target_temp_scale in slimates. I could add just two new config words and execute scale in climate.py. But then it would be necessary to disallow the use of regular scale. But CLIMATE_SCHEMA extends BASE_STRUCT_SCHEMA, which has regular scale.
So I would like to be able to write a configuration like this.
climates:
- name: "Кондиціонер ІТР 115 каб."
slave: 20
address: 4
input_type: holding
current_temp_scale: 0.1 # New
target_temp_scale: 1 # New
max_temp: 30
min_temp: 16
precision: 1
temperature_unit: C
But it introduces some inconsistency with using regular scale, and I take it such a naive change would not be accepted.
Or am I deluded and could do something in style:
vol.Exclusive("std_group", "scale_group", vol.Schema({
vol.Optional(CONF_SCALE): cv.string,
})),
vol.Exclusive("current_target_group", "scale_group", vol.Schema({
vol.Optional(CONF_CURRENT_SCALE): cv.string,
vol.Optional(CONF_TARGET_SCALE): cv.string,
})),