nkgilley / python-ecobee-api

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

Break infinite loop when request malformed #38

Closed balloob closed 5 years ago

balloob commented 5 years ago

When an error happened, it always assumed it was because of a bad request and started hammering the ecobee API by inifinite retrying.

This PR will only retry if credentials have expired and if we have not retried before.

Relevant API docs: https://www.ecobee.com/home/developer/api/documentation/v1/auth/auth-req-resp.shtml

balloob commented 5 years ago

🚤 so fast !

balloob commented 5 years ago

oh no I messed up some syntax 🙈 PR incoming.

balloob commented 5 years ago

39 has syntax fix.