V2.0.4
π Version 2.0.4 β The "River Status" Update
This release introduces the highly requested River Status sensor, which automatically categorizes river levels into actionable states (Normal, High, Low) based on official Environment Agency typical ranges.
π New Features
-
River Status Sensor: A new entity is automatically created for every station. It compares the current level against the station's
typicalRangeHighandtypicalRangeLowto report: -
π’ Normal: Water levels are within the expected seasonal range.
-
π΄ High: Water levels have exceeded the typical high threshold.
-
π‘ Low: Water levels are below the typical low threshold.
-
Enhanced Attributes: The Status sensor now includes high-value metadata in its attributes:
-
typical_range_high -
typical_range_low -
highest_recent(The highest recorded level in recent history).
π¨ Improvements
- User-Friendly Station List: Updated the configuration dropdown format to
Label, Catchment (ID). This makes it much easier to distinguish between multiple stations on the same river (e.g., "Hexham, Tyne (9006)" vs "Corbridge, Tyne (9007)").
π Technical Fixes & Stability
- Deep Data Fetching: The
get_stationlogic now automatically resolves secondary API links for "Stage Scale" data. This ensures that threshold values are fetched even if they aren't provided in the primary station summary. - Python Scope Fix: Resolved an
UnboundLocalErrorrelated to theasync_get_clientsessionhelper. - Robust Error Handling: Added checks to prevent sensor crashes if a station does not provide typical range data (common for some tidal or coastal stations).
π¦ How to Update
- Search for EAFM2 in HACS and select "Update".
- Restart Home Assistant.
- Your new status entities will appear automatically as
sensor.[station_name]_river_status.
A Quick Tip for your Dashboard
Since the new sensor outputs text ("Normal", "High", "Low"), you can use a Conditional Card or Entity Filter Card to only show a big warning on your dashboard when the state is High.