nkgilley / python-ecobee-api

Python API for controlling Ecobee Thermostats
MIT License
44 stars 40 forks source link

Sometimes it is -500 degrees F #36

Closed TonyApuzzo closed 4 years ago

TonyApuzzo commented 5 years ago

I occasionally get a -500 degree F reading from my ecobee. Perusing the source code for this as well as the Home Assistant component, I think this must be coming from ecobee itself.

I see that the documentation for the Vera plugin for Ecobee mentions that -500 means "unknown" http://watou.github.io/vera-ecobee/ and according to this issue -400 and maybe 400 could also be returned.

I haven't figured out where these values might be documented on ecobee's website, despite spending about 30 minutes searching, so I am not entirely sure where the vera plugin author learned this information.

Or maybe the 500 is somehow coming from an HTTP Response code getting misapplied? Clearly I have no idea :-)

Would it make sense to guard for these somewhere?

Example: image

nkgilley commented 5 years ago

Thanks @TonyApuzzo

Looking at the ecobee documentation: https://www.ecobee.com/home/developer/api/introduction/core-concepts.shtml#representation

It shows that -5002 means unknown, and -5003 means calibrating. I'll look into handling these values.

Unknown Values Numeric values whose value is not known are expressed as -5002. This is the numeric equivalent to a null value. The value of -5002 had been chosen as an unknown value because the representation of -500.2F is below absolute zero when representing temperatures.

Calibration Values In some cases a sensor requires time to calibrate before it can provide accurate measurements. The value of -5003 had been chosen to represent the state and make it different from "Unknown" value.

TonyApuzzo commented 5 years ago

Cool! I see that searching their website for "-500" did find a hit, I must not have tried that.

Thanks for looking into it!

Even Alexa has trouble with this as she told my wife it was minus 500 in our house the other day.

marthoc commented 4 years ago

FYI: this problem should be fixed in the next version of Home Assistant as I corrected it in this PR: https://github.com/home-assistant/home-assistant/pull/26634.