Add action to Swiss public transport (#34255)

* add action for spt: fetch_connections

* Update description to use number instead of amount

recommended by coderabbit

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* add example for config_entry_id

* tiny style tweak

* Update source/_integrations/swiss_public_transport.markdown

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Cyrill Raccaud 2024-08-12 14:15:46 +02:00 committed by GitHub
parent 393108b033
commit 4ffcf056f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,6 +41,21 @@ name:
The public timetables are coming from [Swiss public transport](https://transport.opendata.ch/).
### Defining a custom polling interval
## 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
{% include common-tasks/define_custom_polling.md %}