peetereczek / ztm

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

Błędy w wersji 0.1.3 - nie działają sensory na dziennych linii #7

Closed jacekpaszkowski closed 4 years ago

jacekpaszkowski commented 4 years ago

konfiguracja:

  - platform: ztm
    api_key: !secret ztm_api_key
    lines:
      - number: 126
        stop_id: 1097
        stop_number: "01"
      - number: 176
        stop_id: 1097
        stop_number: "01"
      - number: 126
        stop_id: 1097
        stop_number: "03"
      - number: N64
        stop_id: 1097
        stop_number: "02"
      - number: N64
        stop_id: 1096
        stop_number: "02"

błędy:

2020-02-05 22:55:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ztm_126_departures_from_1097_01 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  File "/config/custom_components/ztm/sensor.py", line 155, in async_update
    if  nocny != '':
UnboundLocalError: local variable 'nocny' referenced before assignment
2020-02-05 22:55:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ztm_176_departures_from_1097_01 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  File "/config/custom_components/ztm/sensor.py", line 155, in async_update
    if  nocny != '':
UnboundLocalError: local variable 'nocny' referenced before assignment
2020-02-05 22:55:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ztm_126_departures_from_1097_03 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  File "/config/custom_components/ztm/sensor.py", line 155, in async_update
    if  nocny != '':
UnboundLocalError: local variable 'nocny' referenced before assignment
2020-02-05 22:56:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ztm_126_departures_from_1097_01 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  File "/config/custom_components/ztm/sensor.py", line 155, in async_update
    if  nocny != '':
UnboundLocalError: local variable 'nocny' referenced before assignment
2020-02-05 22:56:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ztm_126_departures_from_1097_03 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  File "/config/custom_components/ztm/sensor.py", line 155, in async_update
    if  nocny != '':
UnboundLocalError: local variable 'nocny' referenced before assignment
2020-02-05 22:56:31 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ztm_176_departures_from_1097_01 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  File "/config/custom_components/ztm/sensor.py", line 155, in async_update
    if  nocny != '':
UnboundLocalError: local variable 'nocny' referenced before assignment
peetereczek commented 4 years ago

Czy sypie tym błędem teraz, z najnowszą wersją?

jacekpaszkowski commented 4 years ago

ok, w 0.2.0 działa :)