wmalgadey / tado_component

Custom home-assistant component for tado (using PyTado)
GNU General Public License v3.0
12 stars 1 forks source link

UnboundLocalError: local variable 'setting' referenced before assignment #22

Closed agross closed 7 years ago

agross commented 7 years ago

Updated to HA 0.50.2 today and got this during startup:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/climate/tado.py", line 291, in update
    setting = setting is not None
UnboundLocalError: local variable 'setting' referenced before assignment
syssi commented 7 years ago

It's already fixed with https://github.com/wmalgadey/tado_component/issues/21. The next release includes the fix.

agross commented 7 years ago

Thanks! 👍