-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meteoalarm - multiple alerts #26
Comments
@EreNDern I see that meteoalarm has changed their api and indeed they allow multiple alerts. That will be difficult by home assistant, because it expect 1 state and not multiple, so I need to think how we can merges multiple alerts to one. |
Because I also want to fetch all available alerts, I have created a modification which uses nested dictionary. Please find attached a diff, I will gladly publish it as a pull request. I then store this nested dictionary in "output" attribute of my custom sensor and can do all the regular jinja magic to work with the statuses further. |
Thanks for the research that you have done, can you submit this in a merge request ? |
Well, I was reluctant to do it as it breaks backward compatibility for all users of the library and for all home assistant users... |
@rolfberkenbosch , can I help with getting support for multiple alerts? I understand the backward compatibility concern. While I use |
Maybe a solution would be to show the most extreme alert |
I don't use MeteoAlarmCard but it seems to be prepared for multiple warnings. |
The only actual solution is to fetch and return all alerts, the whole array. The display job on the HA end is then quite simple. I've been running my custom version of the library for nearly 2 years now but have not found time or energy to move the changes upstream. Feel free to use the code I am attaching here for inspiration. To me - the killer feature is to use regular expressions for filtering of the relevant locations. I run it like this: |
Thank you very much @martkopecky. I will implement what you say if the changes to Home Assistant and meteoalert-api are not accepted. Here is the pull request: #34 |
Would it be possible to add all valid alerts to the attributes of the meteoalarm binary sensor?
The text was updated successfully, but these errors were encountered: