home-assistant.github.io/source/_components/sensor.swiss_public_transport.markdown
Fabian Affolter 6cb4a57d36 Add class
2016-02-22 09:29:43 +01:00

1.2 KiB

layout title description date sidebar comments sharing footer ha_category ha_iot_class
page Swiss Public Transport Instructions how to integrate timetable data for travelling in Switzerland within Home Assistant. 2015-06-02 21:45 true false true true Sensor Local Polling

The swiss_public_transport sensor will give you the next two departure times from a given location to another one in Switzerland.

The Stationboard 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:

http://transport.opendata.ch/v1/locations?query=[Station name]

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:

# Example configuration.yaml entry
sensor:
  platform: swiss_public_transport
  from: STATION_ID
  to: STATION_ID

Configuration variables:

  • from (Required): The ID of the station of the start station.
  • to (Required): The ID of the station of the end station.

The public timetables are coming from Swiss public transport.