Deutsche Bahn tracker with calendar integration


I am a frequent traveler in the German train system of “Deutsche Bahn” and did use for quite some time the GitHub - FaserF/ha-deutschebahn: Unofficial HA DB Integration, due to removal as of Home Assistant 2022.11 integration showing the next trains to go. However, this is not really suitable for planning train times in advance and check when a long distance train goes.

I developed a small Home Assistant Addon which checks for specific strings in your connected calendars and then display the trains going from this calendar entry to the provided destination and makes it easy to display in home assistant if your planned train is on time.

Feel free to try it for your own use case. It is available here: GitHub - cbrand/home-assistant-train-tracker: A tracker for deutsche bahn combined with your calendar to show you the next train option for planned travels

Hey, nice work and always a fan of people promoting public transport stuff !!
I myself started to improve on gtfs2 and am trying to cover trains which are a pita to cover via gtfs. Could you possibly explain your use case(s) so I can see if I can add this to my gtfs2 component?

Sure :slight_smile:

My use case is the following: I have regular train trips between German cities and want to know when the next train goes in a specific schedule (so beginning 8AM on Wednesday for example).
There I want to see when the train departs, if it is delayed and how long the travel time is as well as when I do not get there what the next possible connections are.
My main reason for writing this plug-in was that at one time I stood in front of Hamburg Hbf and the train going to Berlin Hbf which always departs at 8:34 did leave on this specific day instead at 7:40 which made me miss an appointment.
With this integration I can see on the dashboard when the train is going and if it is on time or if the schedule for the specific day changed for any reason.

The main “feature” for me in the integration is also to have it scanning my personal and work calendar so it only shows connections which I am interested in / where I have blocked time in my calendar which makes it usable instead of the regular DB sensor which is really great for short term commuter trains but not really long distance trains.

Thanks for the response…not easy with gtfs data but … I will note it as a enhancement … :slight_smile:

EDIT: it is not ‘just’ gtfs data which I assume DB is also using but it is the realtime on top :slight_smile:

This idea sounds great and I was really keen to install this add-on. I managed it successfully to set it up, but unfortunately my sensor doesn’t provide any fetching data if train connections (even if the debugging tells me that train connections have been found in the calendar). Is there anybody available who was successfully able to set up this add-on? :slight_smile: