Swiss Transport

Swiss Transport – live departure boards & connections for Home Assistant

I built a custom integration that brings Swiss public transport right into Home Assistant – the live departure board of any stop, and your personal saved connections (from → to). Data comes from the free transport.opendata.ch timetable API (backed by search.ch) – no account or API key required.

There’s already the official swiss_public_transport core integration, but it only does A→B connections. This one adds the thing I was missing: a proper station departure board with its own good-looking Lovelace card, plus an auto-generated dashboard.

What it does

  • Departure boards – the live Abfahrtstafel of any station: train, tram, bus, ship or cableway, with real-time delays, platform and destination.
  • Connections – save a route (e.g. your daily commute Olten → Zürich HB) and see the next departures with time, platform, duration and number of transfers.
  • Bundled Lovelace cards – two self-registering cards (no manual resource setup), both with a visual editor. Laid out like a real departure board: symbol · time · countdown · destination · platform · info, with colored line badges and a live date/time bar. The platform column is hidden for bus/tram stops.
  • Auto dashboard – on first setup it creates an “ÖV Abfahrten / Departures” dashboard and adds a card for every station/route you configure (and cleans up when you remove one).
  • Multilingual – German, English, French and Italian, following your HA language.

Installation (HACS)

  1. HACS → Integrations → ⋮ → Custom repositories, add https://github.com/prusuino/ha_swiss_transport with category Integration.
  2. Search for “Swiss Transport”, install, restart HA.
  3. Settings → Devices & Services → Add Integration → “Swiss Transport”, then pick a mode (departure board or connection).

(A HACS default submission is open, so hopefully it’ll be available without the custom-repo step soon.)

Notes

  • Only for stops within Switzerland (and directly connected cross-border stations in the Swiss timetable).
  • transport.opendata.ch is a free community service with rate limits – the integration polls conservatively (~90 s). Real-time delays depend on the operator’s reporting.
  • Data: transport.opendata.ch (search.ch). This project is unofficial and not affiliated with Opendata.ch, search.ch, or any transport operator.
  • Disclaimer: provided as-is, without any warranty. Don’t rely on it as your sole source for catching a connection – always check the official displays.

Links

Feedback and ideas are very welcome – happy to hear how it works for you! :switzerland:

Hi
Thanks a lot for the share :wink: For info there is an other integration that works great and gives also departure board: https://www.openpublictransport.net/ and result in my HA:

Thanks Vincèn for the pointer – OpenPublicTransport looks really solid, I’ll definitely take a closer look at it. This integration takes a narrower but deeper approach: Switzerland only, covering every stop in the Swiss timetable (incl. ships and cableways), cards styled like the actual Swiss station displays with the Swiss product color scheme, and optional official real-time via opentransportdata.swiss OJP 2.0 with cancellations, platform changes, disruption messages and occupancy.

Small update for everyone: v1.2.0 is out with timetable browsing – every board can now be switched from the live view to any date and time: pick a time and see departures from then, or flip to an arrivals mode (“which trains arrive before my meeting?”). A new selector bar card (Live / Departure / Arrival + date-time picker) is added to the auto dashboard and switches all cards at once. Connection cards now also show platforms and transfer stations per leg.

Feedback and ideas welcome as always!

Thanks @Tinu1 for the details, so I’ll give it a try as it looks really nice and efficient :wink: