Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

BVG Sensor Issue #9

@ndom91

Description

@ndom91

Seems the integration can no longer pull updates correctly. I'm using a version 0.0.1 according to the manifest.json in my custom_components/bvg_berlin_public_transport/manifest.json, but 0.3.1 according to HACS

sensor.yaml config:

- platform: bvg_berlin_public_transport
  name: M5 > Hohenschönhausen, Zingster Str.
  direction: "Hohenschönhausen, Zingster Str."
  stop_id: "900000120513"
  walking_distance: 0

Logs:

2023-06-04 15:17:55.735 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.m5_hohenschonhausen_zingster_str fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 781, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/bvg_berlin_public_transport/sensor.py", line 154, in update
    self.singleConnection = self.getSingleConnection(self.direction, self.min_due_in, 0)
  File "/config/custom_components/bvg_berlin_public_transport/sensor.py", line 182, in getSingleConnection
    for pos in self.data:
TypeError: 'NoneType' object is not iterable

Also on the integration page, none of those sensors seem to appear 🤔

image

EDIT: Debug logging enabled confirms my fears, BVG endpoint returning a 503


2023-06-04 16:21:21.543 DEBUG (SyncWorker_2) [custom_components.bvg_berlin_public_transport.sensor] HTTP Error 503: Service Unavailable
2023-06-04 16:21:21.543 WARNING (SyncWorker_2) [custom_components.bvg_berlin_public_transport.sensor] Connection to BVG API lost, using local cache instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions