I’m working on a component to pull weather alerts from the US National Weather Service. However, I’m not sure what the best way to handle the alerts would be from an entity/UI standpoint.
The wunderground
component puts all of the alert text as a state on a single sensor entity. This makes it difficult to parse what kind of alerts are active to use in automations, and does not render well on the default UI.
I thought about using persistent_notification
and it gets close to what I would want, as each alert would then become its own entity and show the alert text on the UI. However, persistent_notification
has some limitations, namely the fact that you can’t give it custom attributes (for things like what time the alert was issues, when it expires, etc). and if a persistent_notification is dismissed, it would simply be recreated the next time the component checks for weather alerts.
So, I’m looking for thoughts and suggestions on how to best handle this. Should we modify persistent_notification to enable custom attributes? Should we create a new type of entity (alert)? Looking for some thoughts/ideas before I dive too deep into this.