custom-components / authenticated

A platform which allows you to get information about sucessfull logins to Home Assistant.
MIT License
82 stars 28 forks source link

Sensor not created in 1.04 #42

Closed DavidFW1960 closed 5 years ago

DavidFW1960 commented 5 years ago

Version of the custom_component

1.04 I think - latest - just upgraded Describe the bug A clear and concise description of what the bug is. 1400 persistent notifications deleted when I restarted (happy about that) but then the sensor is giving an error again. log


Mon Jul 08 2019 08:29:51 GMT+1000 (AEST)

Error while setting up platform authenticated
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, 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/authenticated/sensor.py", line 61, in setup_platform
    if not load_authentications(hass.config.path(".storage/auth")):
  File "/config/custom_components/authenticated/sensor.py", line 291, in load_authentications
    if token["last_used_ip"] > tokens_cleaned[token["last_used_ip"]]["last_used_at"]:
TypeError: '>' not supported between instances of 'NoneType' and 'str'
grantclem commented 5 years ago

Same error also

2019-07-08 09:20:49 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform authenticated
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/authenticated/sensor.py", line 61, in setup_platform
    if not load_authentications(hass.config.path(".storage/auth")):
  File "/home/homeassistant/.homeassistant/custom_components/authenticated/sensor.py", line 291, in load_authentications
    if token["last_used_ip"] > tokens_cleaned[token["last_used_ip"]]["last_used_at"]:
TypeError: '>' not supported between instances of 'NoneType' and 'str'
DavidFW1960 commented 5 years ago

1.05 looks good... thanks @ludeeus