mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-03 17:48:59 +00:00

* Update sensor.vasttrafik.markdown
Add new config option "lines" and extend full example.
* ✏️ Tweaks
1.8 KiB
1.8 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: XXXXXXXXXXXXXXXXXXX
secret: YYYYYYYYYYYYYYYYY
departures:
- from: Musikvägen
Configuration variables:
- key (Required): The API key to access your Västtrafik account.
- secret (Required): The API secret to access your Västtrafik account.
- departures array (Required): List of travel routes.
- name (Optional): Name of the route.
- from (Required): The start station.
- heading (Optional): Direction of the traveling.
- lines (Optional): Only consider these lines.
- delay (Optional): Delay in minutes. Defaults to 0.
The data are coming from Västtrafik.
A full configuration example could look like this:
# Example configuration.yaml entry
sensor:
- platform: vasttrafik
key: XXXXXXXXXXXXXXXXXXX
secret: YYYYYYYYYYYYYYYYY
departures:
- name: Mot järntorget
from: Musikvägen
heading: Järntorget
lines:
- 7
- GRÖN
delay: 10