peetereczek / ztm

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

Update from sensor failed #17

Closed Rrapa closed 3 years ago

Rrapa commented 3 years ago

Hello

Getting recently below error. Can you advice please ? Logger: homeassistant.helpers.entity Source: custom_components/ztm/sensor.py:218 Integration: ztm (documentation, issues) First occurred: 21:25:48 (12 occurrences) Last logged: 21:26:48

Update for sensor.ztm_11_from_5061_04 fails Update for sensor.ztm_171_from_5061_01 fails Update for sensor.ztm_26_from_5061_04 fails Update for sensor.ztm_10_from_5061_04 fails Update for sensor.ztm_523_from_5061_01 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 350, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 558, 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 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 3 years ago

Please update your API key