You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Data fetched successfully: {'api_version': '1.98', 'error': 'Ambiguous station name'}
What version of Home Assistant Core has the issue?
2025.1.2
What version of this Integration has the issue?
2025.01.0
What type of installation are you running?
Home Assistant OS
Example YAML snippet
Anything in the logs that might be useful for us?
2025-01-21 22:09:16.057 DEBUG (MainThread) [custom_components.db_infoscreen] Coordinator initialized for station Frankenforst Kippekausen, Bergisch Gladbach with update interval 3 minutes
2025-01-21 22:09:16.057 DEBUG (MainThread) [custom_components.db_infoscreen] Fetching data for station: Frankenforst Kippekausen, Bergisch Gladbach
2025-01-21 22:09:16.058 DEBUG (MainThread) [custom_components.db_infoscreen] Url: https://dbf.finalrewind.org/Frankenforst Kippekausen, Bergisch Gladbach.json?hafas=1
2025-01-21 22:09:16.165 DEBUG (MainThread) [custom_components.db_infoscreen] Data fetched successfully: {'departures': [{'delay': 0, 'destination': 'Bensberg, Bergisch Gladbach', 'direction': 'Bensberg, Bergisch Gladbach', 'isCancelled': None, 'messages': [], 'platform': None, 'route': [], 'scheduledPlatform': None, 'scheduledTime': 1737493680, 'time': 1737493680, 'train': 'STR 1', 'trainNumber': '54187', 'via': []}, {'delay': 0, 'destination': 'Weiden West, Köln', 'direction': 'Weiden West, Köln', ...
2025-01-21 22:09:16.166 DEBUG (MainThread) [custom_components.db_infoscreen] Finished fetching DB Info Frankenforst Kippekausen, Bergisch Gladbach data in 0.108 seconds (success: True)
2025-01-21 22:09:16.166 DEBUG (MainThread) [custom_components.db_infoscreen.sensor] Setting up DBInfoSensor for station: Frankenforst Kippekausen, Bergisch Gladbach
2025-01-21 22:09:16.166 DEBUG (MainThread) [custom_components.db_infoscreen.sensor] DBInfoSensor initialized for station: Frankenforst Kippekausen, Bergisch Gladbach
2025-01-21 22:09:16.166 DEBUG (MainThread) [custom_components.db_infoscreen.sensor] Sensor added to Home Assistant for station: Frankenforst Kippekausen, Bergisch Gladbach
2025-01-21 22:09:16.166 DEBUG (MainThread) [custom_components.db_infoscreen.sensor] Listener attached for station: Frankenforst Kippekausen, Bergisch Gladbach
2025-01-21 22:09:16.166 WARNING (MainThread) [custom_components.db_infoscreen.sensor] No data received for station: Frankenforst Kippekausen, Bergisch Gladbach
Additional information
I edited the init.py like this because it seems to me, that the information "hafas=1" doesn't cause any errors on urls which do not really need it in the first place:
if data_source == "MVV": url += f"?efa=MVV" if "?" not in url else "&efa=MVV" elif data_source == "ÖBB": url += f"?hafas=ÖBB" if "?" not in url else "&hafas=ÖBB" else: url += f"?hafas=1" if "?" not in url else "&hafas=1"
And I added an extra logger line for checking the url.
But still "no data"...
The text was updated successfully, but these errors were encountered:
The problem
First of all. Thank you for creating a successor to ha-deutschebahn.
This is my first time reporting an issue on GitHub and I'm an absolute beginner in programming.
It seems that some stations need an additional information in the url "?hafas=1".
(For example: https://dbf.finalrewind.org/Frankenforst%20Kippekausen,%20Bergisch%20Gladbach.json?hafas=1)
Otherwise this error comes up:
What version of Home Assistant Core has the issue?
2025.1.2
What version of this Integration has the issue?
2025.01.0
What type of installation are you running?
Home Assistant OS
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
I edited the init.py like this because it seems to me, that the information "hafas=1" doesn't cause any errors on urls which do not really need it in the first place:
if data_source == "MVV": url += f"?efa=MVV" if "?" not in url else "&efa=MVV" elif data_source == "ÖBB": url += f"?hafas=ÖBB" if "?" not in url else "&hafas=ÖBB" else: url += f"?hafas=1" if "?" not in url else "&hafas=1"
And I added an extra logger line for checking the url.
But still "no data"...
The text was updated successfully, but these errors were encountered: