sampsyo / hass-smartthinq

Home Assistant component for LG SmartThinQ HVAC devices
MIT License
284 stars 98 forks source link

[homeassistant.setup] Error during setup of component smartthinq #68

Closed petarvucetin closed 4 years ago

petarvucetin commented 4 years ago

This is a new one. I keep seeing this on other components (Awair but it went away - not sure why):

2020-06-27 14:55:20 ERROR (MainThread) [homeassistant.setup] Error during setup of component smartthinq
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 190, in _async_setup_component
    result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/smartthinq/__init__.py", line 69, in setup
    client = wideq.Client.from_token(refresh_token, region, language)
  File "/usr/local/lib/python3.7/site-packages/wideq/client.py", line 210, in from_token
    client.refresh()
  File "/usr/local/lib/python3.7/site-packages/wideq/client.py", line 192, in refresh
    self._auth = self.auth.refresh()
  File "/usr/local/lib/python3.7/site-packages/wideq/core.py", line 371, in refresh
    self.refresh_token)
  File "/usr/local/lib/python3.7/site-packages/wideq/core.py", line 299, in refresh_auth
    raise TokenError()

Config: smartthinq: token: 439535........................ region: US language: en-US

I did execute the example to get a new token as well.

petarvucetin commented 4 years ago

Used a wrong token :(