PaulAnnekov / tuyaha

Implements the special Tuya Home Assistant API.
Other
141 stars 106 forks source link

Add support for decimal values on set temperature #59

Closed matitalatina closed 3 years ago

matitalatina commented 3 years ago

This PR is needed for this: https://github.com/home-assistant/core/pull/43970 I added the ability to set a temperature with decimals.

3v1n0 commented 3 years ago

I handled this in #54 a bit differently as if the device has no support for decimal values at all, maybe we don't want to accept non-integer ones, no?

PaulAnnekov commented 3 years ago

Please, try to come to a consensus on what PR to merge. I don't have any tuya climate device, so I'm not very acknowledged on what problem are you trying to resolve.

matitalatina commented 3 years ago

We're trying to fix the same issue but differently. Mine is a more "agnostic" approach. I'm just adding decimal values because some thermostats handle it. I tried with mine and it works, even if I put some decimal value that it doesn't support (e.g 17.7 C), it doesn't get any error, he set the rounded value on the thermostat (17.5). @3v1n0 tries to do the same but he tries to understand if the device supports halves or not. I don't understand some of his logic, I added some comments on his PR. We will agree ASAP.

matitalatina commented 3 years ago

We're putting our effort here https://github.com/PaulAnnekov/tuyaha/pull/61 I'm closing this one,