jdejaegh / irm-kmi-ha

Home Assistant weather provider using data from Belgian IRM KMI 🇧🇪 🇱🇺 🇳🇱
MIT License
40 stars 0 forks source link

Storm warning missing #10

Closed patriiiiiiiiiick closed 6 months ago

patriiiiiiiiiick commented 6 months ago

Right now, there is a storm warning for Brussels. I can't find it anywhere. Maybe the warning sensor could be used.

jdejaegh commented 6 months ago

Do you have it in the original app? On mine I see an orange wind warning for Brussels currently

patriiiiiiiiiick commented 6 months ago

Yes, that's why I raise this.

jdejaegh commented 6 months ago

On the app I have the wind alert on Brussels which is also indicated on the warning sensor in my Home Assistant instance. I have a zone called 'bxl' for Brussels and here is the warning sensor state. This is consistent with the only warning shown for Brussels in the app.

Do you have something else that is not consistent?

image nsmail

patriiiiiiiiiick commented 6 months ago

Yes, I do find this sensor. However, its state is off. I see it was last updated on 22 February 2024 at 11:20:18.

warnings:

active_warnings_friendly_names: device_class: safety friendly_name: Warning H123

patriiiiiiiiiick commented 6 months ago

The logbook: image

jdejaegh commented 6 months ago

OK, that's strange: the friendly name should appear and the is_active should be true given the values of starts_at and ends_at.

I'll try to reproduce the issue this week-end when I have a bit more time to look into that.

In the meantime, if you have settings that you think may interfere with the sensor, don't hesitate to share them.

What language is set in Settings > System > General? English, English (GB), something else?

patriiiiiiiiiick commented 6 months ago

English (GB) is indeed what I have. Changing it to French and then restarting HA does make it active (and state=on), indeed. I see the default weather card doesn't show it.

jdejaegh commented 6 months ago

I managed to reproduce the bug with a slightly different outcome: when using 'en-GB' or another language, the sensor for the warnings becomes unavailable. Now, when the language is not one that is supported by the API, it defaults to English for the warning data.

jdejaegh commented 6 months ago

This should be fixed in the latest release https://github.com/jdejaegh/irm-kmi-ha/releases/tag/0.2.3. Feel free to re-open if it does not work for you.

Thanks for reporting the bug!