I’m proposing to make some changes to the UK Environment Agency Flood Monitoring integration and wanted to get the views of @Jc2k (as the integration owner) and the wider community.
I’ve been using this integration and find it very helpful as a guide to when my town is likely to flood, so I can adjust my route when walking my daughter to/from school and also have configured a derivative helper to show the rate that the river is rising/falling which allows me to make some rough calculations about when the river is likely to flood.
Recent changes to the way that the EA predict flooding has been less than helpful, so I’m looking to push a few more features that would extend the integration and add some new functionality.
Specifically:
-
Enhancement to the integration configuration/onboarding to make use of the user configured ‘Home’ latitude and longitude co-ordinates within Home Assistant and allow the user to search for monitoring stations with ‘x’ kilometres from those co-ordinates (where ‘x’ is a value entered in the integration configuration).
-
Add the Lat/Long values as state attributes - this would allow adding the sensor to a map in the future.
-
Change the labelling of newly configured sensors (and the selection list on the configuration screen) to append the River Name attribute (where available, default to how it currently shows).
-
Allow selecting rainfall monitoring stations as well as flood monitoring stations. This is quite useful data as, combined with a derivative it can be used to determine potential future flooding.
The first change also requires an enhancement to the underlying aioeafm
library to extend the get_stations
method to include lat, long
and dist
as parameters. I’ve already made those changes on a branch and (pending testing them locally) I’ll be raising a PR in the future to merge those.
I’m happy to do the heavy lifting here and make the changes to the integration and consider any more that anybody else would like to see, if people think it’s worthwhile?