n4ts / ha-notione

This device tracker uses unofficial API to get data from web.notione.com
Apache License 2.0
7 stars 1 forks source link

Integration fails at startup #5

Open ssuukk opened 7 months ago

ssuukk commented 7 months ago

The log:


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 311, in async_setup_legacy
    setup = await hass.async_add_executor_job(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/notione/device_tracker.py", line 43, in setup_scanner
    NotiOneTracker(hass, config, see)
  File "/config/custom_components/notione/device_tracker.py", line 68, in __init__
    update_interval(None)
  File "/config/custom_components/notione/device_tracker.py", line 63, in update_interval
    self._update_info()
  File "/config/custom_components/notione/device_tracker.py", line 102, in _update_info
    lat = dev['lastPosition']['latitude']
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable```
n4ts commented 7 months ago

@ssuukk Can you send me the content of the endpoint response: https://api.notinote.me/secured/internal/devicelist ? You can obfuscate sensitive data if you want.

ssuukk commented 7 months ago

Sure. Any way to do it from the browser dev console, or should I just try to open this url from your code?