Added multiple sensor types for Trafikverket - Breaking change in configuration (#6006)

Add multiple sensor types for Trafikverket
This commit is contained in:
Jonas Karlsson 2018-08-27 16:13:30 +02:00 committed by Martin Hjelmare
parent 878194555a
commit b31ed71670

View File

@ -10,13 +10,15 @@ footer: true
logo: trafikverket.png logo: trafikverket.png
ha_category: Sensor ha_category: Sensor
ha_release: 0.66.0 ha_release: 0.66.0
ha_iot_class: "Cloud Polling"
--- ---
Showing weather information for air and road temperature provided by [Trafikverket](https://www.trafikverket.se/) in Sweden. Showing weather information provided by [Trafikverket](https://www.trafikverket.se/) weather stations in Sweden.
Potential use cases: Potential use cases:
- Get weather data in general - Get weather data in general.
- You live near a weather station and want to know the current temperature at home - 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. - 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 %} ##### {% linkable_title Configuration %}
@ -29,31 +31,48 @@ sensor:
name: Trafikverket Road WeatherStation Kungälv name: Trafikverket Road WeatherStation Kungälv
api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX
station: Kungälv station: Kungälv
type: road monitored_conditions:
- air_temp
- road_temp
- humidity
- precipitation
- wind_direction
- wind_direction_text
- wind_speed
``` ```
{% configuration %} {% configuration %}
name: name:
description: Unique name of the device in the frontend. description: Your unique name of the device in the frontend.
required: true required: true
type: string type: string
api_key: api_key:
description: API key from Trafikverket. description: Your personal API key from Trafikverket.
required: true required: true
type: string type: string
station: station:
description: Name of the weather station. description: Name of the weather station from Trafikverket.
required: true required: true
type: string type: string
type: monitored_conditions:
description: Defines which temperature you want (`air` or `road`). description: Specify what measurement data to retreive from the weather station.
required: true required: true
type: string type: map
scan_interval: keys:
description: How frequently to query for new data (in seconds). air_temp:
required: false description: Air temperature.
type: int road_temp:
default: 300 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 %} {% endconfiguration %}
##### {% linkable_title Obtaining API key %} ##### {% linkable_title Obtaining API key %}
@ -76,11 +95,31 @@ sensor:
name: Trafikverket Road WeatherStation Kungälv name: Trafikverket Road WeatherStation Kungälv
api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX
station: Kungälv station: Kungälv
type: road monitored_conditions:
- air_temp
- road_temp
- humidity
- precipitation
- wind_direction
- wind_direction_text
- wind_speed
- platform: trafikverket_weatherstation - platform: trafikverket_weatherstation
name: Trafikverket Air WeatherStation Lanna name: Trafikverket Air WeatherStation Lanna
api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX
station: Lanna station: Lanna
type: air monitored_conditions:
- air_temp
- road_temp
- humidity
scan_interval: 600
- platform: trafikverket_weatherstation
name: Trafikverket Precipitation WeatherStation Nöbbele
api_key: eXXcbXXXacXXXXc39XX3aXXX4aXX46XX
station: Nöbbele
monitored_conditions:
- air_temp
- road_temp
- humidity
- precipitation
scan_interval: 600 scan_interval: 600
``` ```