This integration provides information about next departures for different public transport types like Bus, Subway, Tram etc.
The Public Transport Departures
integration uses EFA (Elektronische Fahrplanauskunft) endpoints as data source. This endpoints are maintained by different federal states (Bundesländern) and/or municipalities.
There is a list of known endpoints (will be updated continuously with each release)
If more EFA endpoints are known to you, please write me a short messge or create a new issue with URL. After a check I will add them to supported API's.
Name | API URL | Supports realtime |
---|---|---|
Verkehrsverbund Rhein-Neckar (VRN) | https://www.vrn.de/mngvrn/ | ❌ |
Verkehrs- und Tarifverbund Stuttgart (VVS) | https://www3.vvs.de/mngvvs/ | ❌ |
Name | API URL | Supports realtime |
---|---|---|
MoBY (Bahnland Bayern) | https://bahnland-bayern.de/efa/ | ✅ |
Regensburger Verkehrsverbund (RVV) | https://efa.rvv.de/efa/ | ❌ |
Verkehrsverbund Großraum Nürnberg (VGN) | https://efa.vgn.de/vgnExt_oeffi/ | ❌ |
HACS integration is ongoing!
Until it's finished you can install the integration by adding this repository as a custom repository in HACS, and install as normal.
- Using the tool of choice open the folder for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
folder there, you need to create it. - In the
custom_components
folder create a new folder calledha_departures
. - Download all the files from the
custom_components/ha_departures/
folder in this repository. - Place the files you downloaded in the new folder you created in
step 3
. - Restart Home Assistant
The configuration of integration is made via Home Assistant GUI
- Open
Settings
/Devices & services
- Click on
Add Integration
button - Search for
Public Transport Departures
- Click on integration to start configuration dialog
Step 1 - Choose the API endpoint and enter stop name
In this step
ha-departures
integration will search for all locations matching provided stop name. Please select one of them from the list
You will get list of connections provided by the API for selected stop Select all connection(s) you are interesting in and click on
OK
As result a new Hub
has been created incl. new sensor(s) for each connection you selected in previous step:
You can any time add or remove connections to existing hub's
(stop locations)
Just click on configure
button, select or deselct the connections and click on OK
, Integration will remove obsolete and add new connections to the Home Assistant.
Add a custom template sensor in your configuration.yaml
sensor:
- platform: template
sensors:
furth_197:
friendly_name: 'Fürth Hauptbahnhof - Bus 179 - Fürth Süd(time only)'
value_template: "{{ (as_datetime(states('sensor.furth_hauptbahnhof_bus_179_furth_sud'))).strftime('%H:%m') }}"
Add entity (or entites) card to your Dashboars(don't forget to reload yaml before)
type: entities
entities:
- entity: sensor.furth_197
name: Fürth Hauptbahnhof - Bus 179 - Fürth Süd
icon: mdi:bus
You can use other cards like time-bar-card to visualize remaining time to the next departure. card yaml configuration:
type: custom:timer-bar-card
name: Abfahrten Fürth-Hbf
invert: true
entities:
- entity: sensor.furth_hauptbahnhof_u_bahn_u1_furth_hardhohe
bar_width: 30%
name: U1 - Hardhöhe
guess_mode: true
end_time:
state: true
- entity: sensor.furth_hauptbahnhof_bus_179_furth_sud
bar_width: 30%
name: 179 - Fürth Süd
guess_mode: true
end_time:
state: true
Development is ongoing