home-assistant.io/source/_components/vasttrafik.markdown
Franck Nijhof 1833c32a2c Cleans up front matter (#9835)
* Sets front matter defaults

* Removes default front matter from section templates/pages

* Removes default front matter from addon pages

* Removes default front matter from integration pages

* Removes default front matter from posts

* Removes default front matter from docs pages

* Removes default front matter from other pages

* Fixes blog category pages
2019-07-11 14:35:08 -07:00

2.0 KiB

title, description, logo, ha_category, ha_iot_class, ha_release, redirect_from
title description logo ha_category ha_iot_class ha_release redirect_from
Västtrafik Public Transport Instructions on how to integrate timetable data for traveling in Sweden within Home Assistant. vasttrafik.png
Transport
Cloud Polling 0.30
/components/sensor.vasttrafik/

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