home-assistant.io/source/_components/sensor.trafikverket_weatherstation.markdown
Stuart McCroden 72631830da Standardize example configuration blocks (#6953)
* Standardized values in the example configuration

Removed what appear to be an actual API key from the example configuration.yaml block. And, replaced with values as described in the [developer docs](https://developers.home-assistant.io/docs/en/documentation_standards.html#component-and-platform-pages)

* Standardize example configuration-ecobee

* Standardize example configuration-coinbase

* Standardize example configuration-google assistant

* Standardize example configuration-cloudflare

* Standardize example configuration-cloudflare

* Standardize example configuration-habitica

* Standardize example configuration-ifttt

* Standardize example configuration-openalpr

* Standardize example configuration-multiple

* Standardize example configuration-instapush

* Standardize example configuration-llamalab

* Standardize example configuration-notify

* Standardize example configuration-mailgun

* Standardize example configuration-MULTIPLE

* Standardize example configuration-rtm

* Standardize example configuration-spotcrime

* Standardize example configuration-trafikverket

* Standardize example configuration-uk transport

* Standardize example configuration-wunderground

* Standardize example configuration-wsdot

* Standardize example configuration-telegram

* Standardize example configuration-tts

* Standardize example configuration-tts, vultr

* Replace email entry

* Replace IP address

* Place email address
2018-10-19 22:52:25 +02:00

3.6 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release, ha_iot_class
layout title description date sidebar comments sharing footer logo ha_category ha_release ha_iot_class
page Trafikverket WeatherStation Instructions how to integrate Trafikverket WeatherStation within Home Assistant. 2018-02-01 12:06 true false true true trafikverket.png Weather 0.66.0 Cloud Polling

Showing weather information provided by Trafikverket weather stations in Sweden.

Potential use cases:

  • Get weather data in general.
  • You live near a weather station and want to know the current weather conditions at home.
  • Setup automations for your car heating system. If the road is frozen along the way to work, you might want the car heating system to start earlier.
{% linkable_title Configuration %}

To enable this sensor, add the following lines to your configuration.yaml.

sensor:
  - platform: trafikverket_weatherstation
    name: Trafikverket Kungälv
    api_key: YOUR_API_KEY
    station: Kungälv
    monitored_conditions:
        - air_temp
        - road_temp
        - humidity
        - precipitation
        - wind_direction
        - wind_direction_text
        - wind_speed

{% configuration %} name:
description: Your unique name of the device in the frontend.
required: true
type: string api_key:
description: Your personal API key from Trafikverket.
required: true
type: string
station:
description: Name of the weather station from Trafikverket.
required: true
type: string
monitored_conditions: description: Specify what measurement data to retrieve from the weather station. required: true
type: map
keys: air_temp:
description: Air temperature.
road_temp:
description: The temperature in the road.
humidity:
description: Relative humidity.
precipitation:
description: Type of precipitation (Swedish text).
wind_direction:
description: Wind direction in degrees.
wind_direction_text:
description: Rough wind direction in twelve variants (Swedish text).
wind_speed:
description: Average wind speed during the last 10 minutes.
{% endconfiguration %}

{% linkable_title Obtaining API key %}

Please click here and register to obtain the API key.

{% linkable_title Weather stations %}

Click here to get a map of valid weather stations. Once a station is found, copy the name according to the below picture and paste it in your configuration.yaml file as the station variable.

{% linkable_title Examples %}
sensor:
  - platform: trafikverket_weatherstation
    name: Trafikverket Kungälv
    api_key: YOUR_API_KEY
    station: Kungälv
    monitored_conditions:
        - air_temp
        - road_temp
        - humidity
        - precipitation
        - wind_direction
        - wind_direction_text
        - wind_speed
  - platform: trafikverket_weatherstation
    name: Trafikverket Lanna
    api_key: YOUR_API_KEY
    station: Lanna
    monitored_conditions:
        - air_temp
        - road_temp
        - humidity
  - platform: trafikverket_weatherstation
    name: Trafikverket Nöbbele
    api_key: YOUR_API_KEY
    station: Nöbbele
    monitored_conditions:
        - air_temp
        - road_temp
        - humidity
        - precipitation