peetereczek / ztm

Home Assistant (hass.io) custom component for Warsaw public transport
MIT License
12 stars 2 forks source link

constant errors in logs #14

Closed jacekpaszkowski closed 2 years ago

jacekpaszkowski commented 3 years ago

Every couple of minutes i get error like this for each of my sensors:

2020-11-13 12:28:28 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ztm_126_from_1097_01 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/config/custom_components/ztm/sensor.py", line 139, in async_update
    self._timetable = self.map_results(res.get('response', []))
  File "/config/custom_components/ztm/sensor.py", line 212, in map_results
    return [parse_raw_timetable(row) for row in response['result']]
  File "/config/custom_components/ztm/sensor.py", line 212, in <listcomp>
    return [parse_raw_timetable(row) for row in response['result']]
  File "/config/custom_components/ztm/sensor.py", line 218, in parse_raw_timetable
    for val in raw_result['values']:
TypeError: string indices must be integers
peetereczek commented 2 years ago

Please update your API key