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:
If the above My button doesn’t work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the Add Integration button.
-
From the list, select Swiss public transport.
-
Follow the instructions on screen to complete the setup.
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:
- Go to Settings > Devices & Services, and select your integration.
- On the integration entry, select the three dots.
- Then, select System options and toggle the button to disable polling.
- To define your custom polling interval, create an automation.
- Go to Settings > Automations & Scenes and create a new automation.
- Define any trigger and condition you like.
- Under action, select Call service and use the
homeassistant.update_entity
service.
- Save your new automation to poll for data.