From a9d42da4b125999c741d0a27e4b9957d6932669e Mon Sep 17 00:00:00 2001 From: CV Date: Wed, 12 Dec 2018 16:26:01 +0100 Subject: [PATCH] =?UTF-8?q?Added=20information=20about=20attributes=20+=20?= =?UTF-8?q?note=20fix=20=20=E2=80=A6=20(#7790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added information about attributes + note fix Added detailed information about attributes in a separate section. Moved warning level information into attribute section. Fixed problem with note section. It was not showing correctly on hass.io page. * Added information about attributes + note fix Added detailed information about attributes in a separate section. Moved warning level information into attribute section. Fixed problem with note section. It was not showing correctly on hass.io page. * Added type description for attribute Added type description for attribute --- .../sensor.dwd_weather_warnings.markdown | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/source/_components/sensor.dwd_weather_warnings.markdown b/source/_components/sensor.dwd_weather_warnings.markdown index 9d4b14c472c..99822cafe28 100644 --- a/source/_components/sensor.dwd_weather_warnings.markdown +++ b/source/_components/sensor.dwd_weather_warnings.markdown @@ -27,7 +27,7 @@ sensor: region_name: Hansestadt Hamburg ``` -

+

As it suggests the region name is not the city or nearest city you want to get the warnings for but the next higher level of the governmental district called "Kreis" in German. Be aware, to get the region name you need to use the following link by replacing `Hamburg` with your city: @@ -36,12 +36,6 @@ Be aware, to get the region name you need to use the following link by replacing - Verify if you find any warning for your region here. Your region ("Kreis") will appear only if warnings exist: `https://www.dwd.de/DWD/warnungen/warnapp_landkreise/json/warnings.json?jsonp=loadWarnings`

-The warning level is between 0 (no danger) and 4 (extreme weather conditions): -- Warnungen vor extremem Unwetter (Stufe 4) -- Unwetterwarnungen (Stufe 3) -- Warnungen vor markantem Wetter (Stufe 2) -- Wetterwarnungen (Stufe 1) - {% configuration %} region_name: required: false @@ -54,3 +48,25 @@ name: type: string default: DWD-Weather-Warnings {% endconfiguration %} + +### {% linkable_title Attributes %} + +| Attribute | Description | +| ------------ | -------------------------------------- | +| `last_updated` | Information last update from DWD service. | +| `region_name` | Requested region name. This should be the same as the region name in the configuration. | +| `region_state` | State (Bundesland) in abriviated form the requested region is located, eg. "HE" for "Hessen". | +| `region_id` | Region ID assigned by DWD. | +| `warning_count` | *(int)* Number of issued warnings. There can be more than one warning issued at once. | +| `warning__level` | *(int)* Issued warning level between 0 and 4.
0 == Keine Warnungen,
1 == Wetterwarnungen,
2 == Warnungen vor markantem Wetter,
3 == Unwetterwarnungen,
4 == Warnungen vor extremem Unwetter | +| `warning__type` | *(int)* Issued warning type.
0 == ?,
1 == ?,
2 == ?,
3 == ?,
4 == ?,
5 == Frost,
6 == Glätte | +| `warning__name` | This name correlates with the warning type and indicates it in short as a string. | +| `warning__headline` | Official headline the weather warning. | +| `warning__start` | Starting time and date of the issued warning. | +| `warning__end` | Ending time and date of the issued warning. | +| `warning__description` | Details for the issued warning. | +| `warning__instruction` | The DWD is sometimes providing helpful information about precautions to take for the issued warning. | + +

+In the attribute name `x` is the counter of the warning starting from `1`. +