Swiss public transport


The Swiss public transport integration will give you the next three departure times from a given location to another one in Switzerland.

The Swiss public transport API only allows 1000 requests per 24 hours. The default polling rate is set to 90s, which is just enough for one connection polling continuously. If more entries are needed, consider defining a custom polling interval to reduce the amount of requests.

The Stationboard website can help to determine the exact name of the start and the end station.

Configuration

To add the Swiss public transport integration to your Home Assistant instance, use this My button:

Configuration Variables

from string Required

The ID of the station of the start station.

to string Required

The ID of the station of the end station.

name string (Optional, default: Next Departure)

The name of the sensor.

The public timetables are coming from Swiss public transport.

Defining a custom polling interval

If you want to define a specific interval at which your device is being polled for data, you can disable the default polling interval and create your own polling automation.

To add the automation:

  1. Go to Settings > Devices & Services, and select your integration.
  2. On the integration entry, select the three dots.
    • Then, select System options and toggle the button to disable polling. Disable polling for updates
  3. To define your custom polling interval, create an automation.
  4. Save your new automation to poll for data.