Closed faspina closed 6 years ago
same issue here
I've been having this same problem ever since using the homebridge addon, and in the interest of moving this along I took a shot at it. As a disclaimer, I knew nothing about the homebridge or HAP-NodeJS library internals until like an hour ago, so could be off base.
First, it seems that this is a problem with displaying the temperatures within iOS. For example, when i set the temperature to 165 degrees F in HomeKit, my thermostat is (appropriately?) set to 74 degrees F.
Digging around the HAP-NodeJS library, I came across this comment which mentions that the HomeKit Protocol deals only in Celsius, and relies on the iOS-side application to convert temperatures to Fahrenheit. I'm suspecting the temperature is being sent to HomeKit (in my case, the current temperature of 74 is sent) along with the Characteristic.TemperatureDisplayUnits.FAHRENHEIT
, which then converts the 74 to 165. Same for minTemp/maxTemp.
If this is what's actually causing the problem, it seems like the following could work:
current_temperature
, min_temp
, max_temp
) from Fahrenheit to CelsiusCharacteristic.TemperatureDisplayUnits.FAHRENHEIT
on the ThermostatService
. I assume this tells the iOS frontend to convert the numbers to Fahrenheit.Any thoughts? Or am I totally off?
Having this issue as well with a Radio Thermostat.
Fixed via #231
My temps are being converted as if they are default to C , in other words the temperature in HomeKit shows as 162. There was a another thread on this I was wondering if it could be fixed.