From 1c43059f4d4bac991fd4c8e65ad93c7625af97f8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 22 Sep 2017 06:38:14 +0200 Subject: [PATCH] Add config var and update details (#3241) * Add config var and update details * Add API requests limit --- .../_components/sensor.swiss_public_transport.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/_components/sensor.swiss_public_transport.markdown b/source/_components/sensor.swiss_public_transport.markdown index d352afc0006..bb4a265bc3a 100644 --- a/source/_components/sensor.swiss_public_transport.markdown +++ b/source/_components/sensor.swiss_public_transport.markdown @@ -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 # Example configuration.yaml entry @@ -34,5 +34,6 @@ Configuration variables: - **from** (*Required*): The ID of the station of the start 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).