potmat / homebridge-google-nest-sdm

A Homebridge plugin for Google Nest devices that uses the Google Smart Device Management API. Supports Cameras, Doorbells, Displays, and Thermostats. Includes support for HomeKit Secure Video.
ISC License
140 stars 17 forks source link

Fix: Fix fahrenheit accuracy and step size #48

Closed hn-git closed 1 year ago

hn-git commented 1 year ago

A step size of 1 causes an incorrect conversion when displaying fahrenheit and inability to step by 1F

Use the homekit default of 0.1 to provide sufficient precision to fix this.

The Home app temperature widget limits the min step size for the target temperature to 0.5C and 1F.

potmat commented 1 year ago

@hn-git: If this is the case then wouldn't it be simpler to not bother setting minStep at all?

hn-git commented 1 year ago

That also works, that is what I tested first. Tradeoff would be if the homebridge HAP-NodeJS lib or homekit changes their default it could break things; but that seems unlikely. I also didn’t spend time to test if a precision higher than 0.1 would be supported and/or improve anything and this would make it easier if someone wants to mess with it. I don’t feel strongly about it. I can remove it if that’s your preference.

potmat commented 1 year ago

@hn-git: Yes if the default is already 0.1 then I would prefer we just don't set anything at all.

potmat commented 1 year ago

@hn-git : Try version 1.1.9