Vedeneb / HA-SmartThings-Find

Home Assisstant custom integration to provide data from Samsung SmartThings Find, such as SmartTag locations
MIT License
34 stars 10 forks source link

Error setting up entry SmartThings Find for smartthings_find #13

Closed davidalben closed 4 months ago

davidalben commented 4 months ago

Hello. I noticed yesterday that the integration stopped working. I tried to reload it, and I get the following error:

Registrador: homeassistant.config_entries
Fonte: config_entries.py:594
Ocorreu pela primeira vez: 10:33:45 (1 ocorrências)
Último registro: 10:33:45

Error setting up entry SmartThings Find for smartthings_find
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthings_find/__init__.py", line 33, in async_setup_entry
    await fetch_csrf(hass, session)
  File "/config/custom_components/smartthings_find/utils.py", line 215, in fetch_csrf
    hass.data[DOMAIN]["_csrf"] = csrf_token
    ~~~~~~~~~^^^^^^^^
KeyError: 'smartthings_find'

I suspect that the token may have expired. How do I generate a new token?

Thank you.

davidalben commented 4 months ago

Uodate: I restarted Home Assistant and the integration came back without errors. Sorry.

quack3d commented 4 months ago

I get identical errors and reloading the integration just says 'Could not configure. Check logs.' Restarting HA fixes it though but it's annoying to have to do that. :)

Vedeneb commented 4 months ago

Yeah, I also had the issue a few times recently. Not sure what's going and. Didn't find the time yet to investigate.

Vedeneb commented 4 months ago

Hi, just released v0.2.0 which should fix this issue.