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 API90s, 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
Configuration
To add the Swiss public transport integration to your Home Assistant instance, use this My button:
        Manual configuration steps
      
      
      
      
    
    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
Actions
The Swiss public transport integration has the following action:
swiss_public_transport.fetch_connections
Action swiss_public_transport.fetch_connections
Fetch the connections for a specific instance.
| Data attribute | Optional | Description | 
|---|---|---|
config_entry_id | 
No | The ID of the Swiss public transport config entry to get data from. For example, in YAML: config_entry_id: zurich_geneva or in UI Instance: zurich_geneva) | 
limit | 
Yes | The number of connections to fetch. (default: 3, range: [1,15]) | 
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 
. - Then, select System options and toggle the button to disable polling.
 
 - 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.
 - Select Add action, then, select Other actions.
 - Select Perform action, and from the list, select the 
homeassistant.update_entityaction.
 
 - Save your new automation to poll for data.