Einstein42 / udi-ecobee-poly

Ecobee Poly
MIT License
5 stars 2 forks source link

NS crash when pin not returned #69

Open jimboca opened 3 years ago

jimboca commented 3 years ago
2021-05-03 17:57:45,912 Controller polyinterface      ERROR    polyinterface:write: Exception in thread Controller:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/var/polyglot/.local/lib/python3.7/site-packages/polyinterface/polyinterface.py", line 854, in _parseInput
    self.longPoll()
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 159, in longPoll
    self.updateThermostats()
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 490, in updateThermostats
    thermostats = self.getThermostats()
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 728, in getThermostats
    if not self._checkTokens():
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 306, in _checkTokens
    return self._getRefresh()
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 427, in _getRefresh
    self._reAuth('{} and Token expired'.format(res_data['error']))
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 216, in _reAuth
    self.authorize()
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 206, in authorize
    self._getPin()
  File "/var/polyglot/nodeservers/Ecobee/nodes/Controller.py", line 231, in _getPin
    if 'ecobeePin' in res_data:
TypeError: argument of type 'bool' is not iterable