Västtrafik Public Transport


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 Variables

key

(string)(Required)The API key to access your Västtrafik account.

secret

(string)(Required)The API secret to access your Västtrafik account.

departures

(list)(Required)List of travel routes.

name

(string)(Optional)Name of the route.

from

(string)(Required)The start station.

heading

(string)(Optional)Direction of the traveling.

lines

(list | string)(Optional)Only consider these lines.

delay

(string)(Optional)Delay in minutes.

Default value: 0

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