home-assistant.io/source/_components/vasttrafik.markdown
2019-04-03 10:16:08 -07:00

2.1 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_iot_class, ha_release, redirect_from
layout title description date sidebar comments sharing footer logo ha_category ha_iot_class ha_release redirect_from
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
/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