Skip to content

2026.02.3 updated README

Choose a tag to compare

@DTekNOdev DTekNOdev released this 12 Feb 13:43

Small tweaks to the README, otherwise from before:

Added

  • 🛡️ HTML Sanitizer: Automatic cleanup of malformed HTML from API

    • Fixes unclosed tags in operator-provided descriptions (e.g., <ul>, <b>, <li>)
    • Prevents markdown rendering issues caused by broken HTML
    • Smart inline tag closure when parent block elements close
    • Preserves properly formatted HTML while fixing errors
  • 🎨 Enhanced Visual Layout: Improved disruption display with Home Assistant components

    • Banner-style <ha-alert> boxes for visual hierarchy
    • Badge displayed in separate red alert header per transit line
    • Each disruption shown in its own red alert box with summary as title
    • Dates displayed in styled table (bold labels, italic values) within alert
    • Description text contained within alert for proper alignment and background
    • Clear visual separation when multiple disruptions affect same line

Changed

  • 📋 Template-Based Rendering: Summary sensor now uses Jinja2 templates

    • Consistent rendering between individual line sensors and summary sensor
    • All formatting logic centralized in templates for easier customization
    • Automatic grouping of disruptions by line using groupby filter
    • Cleaner Python code without HTML/markdown string concatenation
  • 🔧 Badge Display Improvements: Higher quality badges in summary attributes

    • Increased badge height from 28px to 32px for crisp display at natural size
    • Fixed markdown indentation issues with proper separator formatting
    • One badge per line with all disruptions grouped underneath
  • 🎯 Disruption Consolidation: Multiple disruptions for same line now grouped together

    • Single badge displayed per transit line
    • All disruptions for that line stacked underneath
    • Clear visual hierarchy with horizontal rules between different lines
    • Eliminates duplicate badges for lines with multiple issues

Fixed

  • ⏱️ Rate Limit Compliance: Increased update interval from 60 to 75 seconds
    • Entur API enforces 5 requests per 5-minute rolling window (not fixed window)
    • Previous 60-second interval caused periodic 429 errors after ~5-6 minutes of operation
    • New 75-second interval (300s / 5 = 60s + 15s safety margin) ensures compliance
    • Updated documentation to accurately describe rolling window behavior
    • Fixed incorrect "5 requests per minute" comment in code (actual limit: 5 per 5 minutes)

Changed

  • 💾 Recorder Optimization: Excluded large attributes from state history
    • Line sensors: formatted_content and entity_picture excluded from recorder
    • Summary sensor: markdown_active and markdown_planned excluded from recorder
    • Significantly reduces database size without losing functionality
    • Follows Home Assistant best practices for attributes not suitable for history