custom-components / weatheralerts

A sensor that gives you weather alerts from alerts.weather.gov.
MIT License
123 stars 15 forks source link

Notifications being repeated #35

Closed jlverhagen closed 4 years ago

jlverhagen commented 4 years ago

Version of the custom_component v0.1.0

Describe the bug Sometimes multiple alerts are issued at the same time (with the same 'sent' time in the json feed) and the json feed will randomly swap the order of these alerts each time the feed is downloaded. For example, Alert A and Alert B issued with the same 'sent' date/time info. Sometimes the json feed will show Alert A first and Alert B second, sometimes it will show Alert B first and Alert A second. This can cause new notifications to be triggered each time the weather alerts feed is downloaded with the alert order changed (potentially every 30 seconds)...which can get quite annoying and cause high quota usage if pushing notifications through a service like Pushbullet.

I am testing a fix now and will commit the change within a few days if I don't see any abnormal behavior as a result of the change. In the meantime, if you are experiencing this issue, you should disable the automations that trigger the notifications temporarily until the offending alerts expire and then you can re-enable those automations.

jlverhagen commented 4 years ago

A fix is committed. v0.1.1 is released.