home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.19k stars 29.85k forks source link

OpenTherm Gateway current temperature not precise #17524

Closed paulvt closed 5 years ago

paulvt commented 5 years ago

Home Assistant release with the issue:

0.80.0

Last working Home Assistant release (if known):

N/A

Operating environment (Hass.io/Docker/Windows/etc.):

Python virtualenv installation on Linux

Component/platform:

opentherm_gw

Description of problem:

The precision setting should only apply for target temperature. It seems that is also applied for the current temperature? While the target temperature should have a certain precision for some thermostats to accept it, the current temperature attribute is just for measuring and can be as accurate as the thermostat/OpenTherm Gateway provides (in my case the precision is 0.01). Please lift the precision application from the current temperature attribute.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

climate:
  - platform: opentherm_gw
    device: socket://localhost:7686
    name: Thermostat
    precision: 0.5

Traceback (if applicable):

N/A

Additional information:

None.

mvn23 commented 5 years ago

Precision is applied for the entire opentherm_gw climate platform. This way both the target temp and the current temp will have similar values and precision. If we were to pass the provided value along without any parsing, it would look ugly with some other thermostats (mine reads 19.59765625 at the moment). If you want more precision, #17314 will introduce sensor support where you can export the reading from the backend as a sensor. The sensor will be limited to a precision of 0.1 and I honestly don't see a use case where even higher precision would be required.

paulvt commented 5 years ago

Ok that makes sense. Nice, yes, I was already thinking about sensors. That PR is looking good, cheers!