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

'NoneType' object is not subscriptable #1

Closed pejotigrek closed 2 years ago

pejotigrek commented 3 years ago

not sure if this is the newest version issue, or was here earlier as I had the component turned off for some time, but after update I can see this in HomeAssistant's log:

2021-02-07 23:55:30 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 239, in async_setup_legacy
    setup = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, 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 111, in _update_info
    battery = dev['notiOneDetails']['battery']
TypeError: 'NoneType' object is not subscriptable
n4ts commented 3 years ago

@pejotigrek this the same case like in other issue. Can you send me output from https://api.notinote.me/secured/internal/devicelist after login?

pejotigrek commented 3 years ago

understood. so here's the output - it gave me a 403 error.

pejotigrek commented 2 years ago

I guess the project died?

n4ts commented 2 years ago

fixed bc0357b

pejotigrek commented 2 years ago

thanks. log is clean, issue seems to be fixed! :)