mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-17 22:36:51 +00:00
Add config var and update details (#3241)
* Add config var and update details * Add API requests limit
This commit is contained in:
parent
3a69a04bd8
commit
1c43059f4d
@ -14,13 +14,13 @@ ha_release: pre 0.7
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
The `swiss_public_transport` sensor will give you the next two departure times from a given location to another one in Switzerland.
|
The `swiss_public_transport` sensor will give you the next three departure times from a given location to another one in Switzerland.
|
||||||
|
|
||||||
The [Stationboard](http://transport.opendata.ch/examples/stationboard.html) website can help to determine the exact name of the start and the end station. With the station names it's necessary to search for the ID of those stations:
|
The [Swiss public transport API](http://transport.opendata.ch/) only allows 1000 requests per 24 hours.
|
||||||
|
|
||||||
http://transport.opendata.ch/v1/locations?query=[Station name]
|
The [Stationboard](http://transport.opendata.ch/examples/stationboard.html) website can help to determine the exact name of the start and the end station.
|
||||||
|
|
||||||
If the score is 100 ("score":"100" in the response), it is a perfect match. Then add the data to your `configuration.yaml` file as shown in the example:
|
Then add the data to your `configuration.yaml` file as shown in the example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
@ -34,5 +34,6 @@ Configuration variables:
|
|||||||
|
|
||||||
- **from** (*Required*): The ID of the station of the start station.
|
- **from** (*Required*): The ID of the station of the start station.
|
||||||
- **to** (*Required*): The ID of the station of the end station.
|
- **to** (*Required*): The ID of the station of the end station.
|
||||||
|
- **name** (*Optional*): The name of the sensor. Defaults to 'Next Departure'.
|
||||||
|
|
||||||
The public timetables are coming from [Swiss public transport](http://transport.opendata.ch).
|
The public timetables are coming from [Swiss public transport](http://transport.opendata.ch).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user