core: DWD Weather Warning Integration: Alerts are not in chronological order and Start/End-Time wrong

The problem

If you have several alerts in the attributes, this are not in chronological order

Example for region_name: 105315000 at 16.02.2022, 22:00 Uhr

warning_count: 3
warning_1_name: SCHWERE STURMBÖEN
...
warning_1_start: 2022-02-16T21:00:00+00:00
warning_1_end: 2022-02-17T09:00:00+00:00
...
warning_2_name: STURMBÖEN
warning_2_start: 2022-02-16T08:00:00+00:00
warning_2_end: 2022-02-16T21:00:00+00:00
...
warning_3_name: STURMBÖEN
warning_3_start: 2022-02-17T09:00:00+00:00
warning_3_end: 2022-02-17T17:00:00+00:00

In the DWD-Warn-App the warnings are in chronological order on the start date/time

At the example above:

1.) Sturmböen, 16.02.2022, 09:00 Uhr - 16.02.2022, 22:00 Uhr 2.) Schwere Sturmböen, 16.02.2022, 22:00 Uhr - 17.02.2022, 10:00 Uhr 3.) Sturmböen, 17.02.2022, 10:00 Uhr - 17.02.2022, 18:00 Uhr

And you can see, there is an time difference from 1 hour (UTC to UTC+1)

Expected behavior:

Warnings always in chronological order on the start date/time and the time in local german time (UTC+1) because the warnings are always from german.

What version of Home Assistant Core has the issue?

core-2022.2.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Deutscher Wetterdienst (DWD) Weather Warnings

Link to integration documentation on our website

https://www.home-assistant.io/integrations/dwd_weather_warnings

Diagnostics information

No response

Example YAML snippet

- platform: dwd_weather_warnings
    region_name: 105315000
    name: Warnwetter Köln

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

For testing i implemented the three sorting options (“none”, “severity” and “date”) @GerdRuetten described and the results looks good. But before making a pull-request we should wait what dwd answers and maybe add a fourth option.

The information when a warning was issued (raw data value <effective>) is currently not provided by the underlying dwdwfsapi. But anyway sorting by the time a warning was published doesn’t make sense for me.

The next days i will make a pull-request with the three sorting options from above.

For clarification: When i’m talking about sorting by date i mean sorting by the raw data value <onset> = home assistant value <start> When i’m talking about sorting by severity i mean sorting by the raw data value <severity> = home assistant value <level>