home-assistant.io/source/_components/sensor.vasttrafik.markdown
Fredrik Baberg a2ba9f46b3 Vasttrafik sensor configuration variable style (#6414)
* Style for configuration variables description

Change to new style for configuration variables description (#6385).

* Updated configuration example

* Corrected from to be required variable.

* Removed quote of decsription text.

* Corrected incorrect linebreak.

* Minor change

* Change to list
2018-10-02 18:08:20 +02:00

2.1 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_iot_class, ha_release
layout title description date sidebar comments sharing footer logo ha_category ha_iot_class ha_release
page Västtrafik Public Transport Instructions on how to integrate timetable data for traveling in Sweden within Home Assistant. 2016-10-05 08:45 true false true true vasttrafik.png Transport Cloud Polling 0.30

The vasttrafik sensor will provide you traveling details for the larger Göteborg area in Sweden from the Västtrafik public transportation service.

You must create an application here to obtain a key and a secret.

Add the data to your configuration.yaml file as shown in the example:

# Example configuration.yaml entry
sensor:
  - platform: vasttrafik
    key: YOUR_API_KEY
    secret: YOUR_API_SECRET
    departures:
      - from: Musikvägen

{% configuration %} key: description: The API key to access your Västtrafik account. required: true type: string secret: description: The API secret to access your Västtrafik account. required: true type: string departures: description: List of travel routes. required: true type: list keys: name: description: Name of the route. required: false type: string from: description: The start station. required: true type: string heading: description: Direction of the traveling. required: false type: string lines: description: Only consider these lines. required: false type: [list, string] delay: description: Delay in minutes. required: false type: string default: 0 {% endconfiguration %}

The data are coming from Västtrafik.

A full configuration example could look like this:

# Example configuration.yaml entry
sensor:
  - platform: vasttrafik
    key: YOUR_API_KEY
    secret: YOUR_API_SECRET
    departures:
      - name: Mot järntorget
        from: Musikvägen
        heading: Järntorget
        lines:
          - 7
          - GRÖN
        delay: 10