NorthernMan54 / homebridge-tasmota

Plugin for Tasmota devices leveraging Home Assistant auto discovery
Apache License 2.0
35 stars 9 forks source link

fahrenheit not being respected by homebridge #33

Open reverendalc opened 3 years ago

reverendalc commented 3 years ago

temperature sensors (AM2302/DHT22 on ESP01S) running tasmota 9.5 set to Fahrenheit are being interpreted as celsius and subsequently re-converted to Fahrenheit.

configure device to report Fahrenheit with SO8 1

tasmota web service reports 73º Fahrenheit. homebridge accessory pane reports 164º Fahrenheit, and homekit receives the final value from homebridge

Logs: 2021-08-27T23:14:22.999Z Tasmota:mqtt emit tele/sensors/mbathsensor/SENSOR {"Time":"2021-08-28T00:14:23","AM2301":{"Temperature":77.5,"Humidity":49.3,"DewPoint":57.0},"TempUnit":"F"} 2021-08-27T23:14:22.999Z Tasmota:sensor statusUpdate Master Bathroom Temperature Sensor tele/sensors/mbathsensor/SENSOR {"Time":"2021-08-28T00:14:23","AM2301":{"Temperature":77.5,"Humidity":49.3,"DewPoint":57.0},"TempUnit":"F"} 2021-08-27T23:14:23.002Z Tasmota:sensor statusUpdate Master Bathroom Humidity tele/sensors/mbathsensor/SENSOR {"Time":"2021-08-28T00:14:23","AM2301":{"Temperature":77.5,"Humidity":49.3,"DewPoint":57.0},"TempUnit":"F"}

tasmota template: {"NAME":"ESP01","GPIO":[1,1,1,1,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":18} sensor on GPIO0

image image MAN it's hot in there!!!

homebridge running on raspberry pi4 8gb dedicated machine (also runs mosquitto)

tasmota 9.5 .0.0.120 homebridge 1.3.4 running raspbian

jimiamoore commented 2 years ago

Same issue here. I think homebridge just presumes all temp sensors report in celsius. I have two other bluetooth/homebridge sensor/plugins and they too show up in homebridge as celsius. Homekit correctly coverts all of them from C to F. I had to revert back to Celsius "setoption8 0" to get the temp sensor to show correctly in the Home app. It would be nice if I could figure out how to see the temp in F on the Tasmota webpage too but I've yet to discover how.