Skip to content

2.4.0 minor tweaks to split expected and ongoing alerts

Choose a tag to compare

@DTekNOdev DTekNOdev released this 12 Feb 13:19

[2.4.0]

Added

  • Split Ongoing and Expected Alerts - Separate formatted content attributes for better display control
    • New formatted_content_expected attribute for alerts that haven't started yet
    • Existing formatted_content now only shows ongoing alerts (already started)
    • New ongoing_alerts count attribute (number of alerts already active)
    • New expected_alerts count attribute (number of alerts starting in the future)
    • State (active_alerts) remains the total count of all alerts
    • Enables separate display cards for current vs. upcoming alerts
    • Alert timing based on starttime field compared to current time
    • Both attributes available for CAP-formatted sensors only

Technical Details

  • Alerts are split based on their starttime field
  • If starttime > now: classified as "expected" (future)
  • If starttime <= now or no starttime: classified as "ongoing" (current)
  • formatted_summary continues to show all alerts (combined) as before
  • Timezone-aware comparison handles both naive and aware datetimes

[previously]

Changed

  • 🎨 Enhanced Visual Layout - Improved alert display with Home Assistant markdown card
    • Banner-style <ha-alert> boxes for visual hierarchy
    • Alert icons displayed in separate colored alert header (color based on severity)
    • Severity-based coloring: Red (Severe/Extreme), Orange (Moderate/Minor), Blue (Unknown)
    • Each alert shown in colored box with event name and status as title
    • Time periods displayed in styled table (bold labels, italic values) within alert
    • All alert details (description, instructions, consequences, area) contained within alert box
    • Better visual alignment and background for comprehensive alert information
    • Removed markdown headers (####) in favor of bold text within alerts