If you add the integration in the UI you don’t need to add it in configuration.yaml, that’s what I did and it worked fine.
The code shared is the entire card btw, if you copy and paste that markdown card into your lovelace UI it should work fine. I’ve been using it just as its shared for a bit now without issue. What’s issue are you encountering?
Thanks, yes it’s working very good…
BTW actually i have only two alerts about drought and volcano… if there are more they will be added automatically? (for example earthquake)
Yes. So the way it works is this, it basically draws a circle on the map. The center of that circle is the latitude/longitude point which you provided when configuring that integration and the radius is what you provided there as well. To see what is actually in that circle I found this tool useful.
The integration will then watch the global GDACS feed. Any time an event pops up it comes with a shape describing where on the map that event effects. If the affected area of the event overlaps with your circle then the integration creates a new geo_location.xxxxx entity. That’s what this card is watching for, its showing you all entities available in the domain geo_location. When the event is over or its affected area no longer overlaps with your circle then the integration cleans those entities up.
Therefore you will only see currently active events. What you’re seeing now is the active GDACS events in your specified area. If an earthquake event gets published then you’ll see that but only when there’s actually an earthquake event.
Thank you for this card, it works great. Wondering how you would add a clickable link to each GDACS report, so you can see the full details of each alert. For example, I just received an alert for this, and the GDACS site has a full description of it: https://www.gdacs.org/report.aspx?eventtype=TC&eventid=1000735&episodeid=12
Thanks!
EDIT: Ok, I’m pretty new with Python but I think I figured this out based on GDACS report formats. This works for me, I’ll see if it works in the long run. I added this to then end of the above code:
See detailed report <a href="https://www.gdacs.org/report.aspx?eventtype={{ state.attributes.external_id[:2] }}&eventid={{ state.attributes.external_id[2:255] }}">here</a>
Based on that I assume the alert_level attribute is a color. So should be able to change that if statement inside the for loop to further restrict what you see if you only want to see red ones. Something like this should work:
{% if state.attributes.source=="gdacs" and state.attributes.alert_level == "red" %}
Just to be clear, I can’t test this right now and confirm it actually works since I don’t have a GDACS alert to look at right now. I’m just guessing from the template and the fact that you’re telling me some of them are red. So I’m assuming the red ones have a value of red in alert_level. Try it out though and tweak if necessary.
This card is exactly what I’m looking for, however, it doesn’t seem to be working for me, does anyone see any issue with the code here? All I see is the title.
I’ve tried both the original code in the first post, as well as the conditional code, which is my preference, however both do not show up.
When I edit the card/page, both entries are showing me this error: