Hi there,
Recent days I worked on a Swiss Public Transport Card for the Home Assistant Lovelace UI. The card currently can display departures in a stationboard style:
To make this work I also had to work on the swiss public transport integration. At this stage this changes are still under review (https://github.com/home-assistant/home-assistant/pull/30715), so this card cannot readily be used. However, if you are willing to update the component manually, I made the card available on Github and added a README.md: https://github.com/agners/swiss-public-transport-card
At this point the card pretty much does what I wanted it to do. I am not entirely happy with the styling yet (e.g. the platform looks somewhat lost on the left corner). Ideas/feedback welcome!
There is some unique behavior with the backend/API: Zürich Hardbrücke (like most train station) are two stations in the transport.opendata.ch API, one for the Bus/Tram stop and one for the train stop. That is why I had to add stationboard as a list, so one can add both stations. The HA integration makes for each station an API request, combines the departures and sorts them by time. For each station the next 5 (or whatever limit is configured) departures get fetched. The problem with that approach is if the two stations have departures at different intervals it leads to a bit uneven stationboard (e.g. buses of the next 5 minutes are displayed but trains of the next 30 minutes…). It’s not a huge issue, just somewhat unfortunate.
I was also thinking to add support for the connection mode (maybe displaying similar to how Google Maps Direction mode does). Let me know what you think.
Cheers,
Stefan