karlg100 / homebridge-frigidaire

homebridge Platform plugin for Frigidaire connected appliances
29 stars 10 forks source link

Invalid characteristics for temperature #27

Closed amaisano closed 3 years ago

amaisano commented 3 years ago

The 2.0 update works! However, now my current temperature numbers are all out of whack (see image). They shouldn't be negative Celsius values... (I use Celsius in the house).

image

Wed, 02 Jun 2021 16:41:14 GMT frigidaire applianceId 71012357-C83DD4BA1AE2 attribute 0432 has the value 20
Wed, 02 Jun 2021 16:41:14 GMT homebridge-frigidaire getTargetTemperature: 20 -> -6.666666666666666
[6/2/2021, 12:41:14 PM] [homebridge-frigidaire] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number -6.666666666666666 exceeded minimum of 15.5. See https://git.io/JtMGR for more info.
amaisano commented 3 years ago

If I go into the 2.0 app and change the AC to use Fahrenheit, the UI shows the correct Celsius temps... but shouldn't it show the Fahrenheit temps because that is what the AC and App are set to use? This is really confusing... is this codebase hard-coded for Celsius or is there a config settings I am not using correctly?

karlg100 commented 3 years ago

HAP and Homebridge handle all temps in C. I'll look into this as I refactor things.

karlg100 commented 3 years ago

found the issue. there was a double conversion from F to C happening when in C mode. https://github.com/karlg100/homebridge-frigidaire/commit/ea44e66090048aae73644de088641a6d9cffa63b fixed and pushed into next release, which will be 2.1.1.