Skip to content

v1.3.1

Choose a tag to compare

@Geek-MD Geek-MD released this 15 Oct 19:02
99dfca0

πŸ†• HA Daily Counter v1.3.1

🐞 Fixes

  • Fixed startup crash when loading counters
    Resolved KeyError: 'trigger_entity' caused by configurations using the newer multi-trigger format.
    The integration now seamlessly supports both schemas:

    • Legacy schema: trigger_entity + trigger_state
    • Multi-trigger schema: triggers + logic
      ensuring backward compatibility and stable migration between versions.
  • Improved entity initialization

    • Prevents crashes when configuration data is incomplete or malformed.
    • Adds warnings for invalid configurations without interrupting setup.
    • Guarantees that all counters correctly create and restore their entities at startup.
  • Stable restoration and reset behavior

    • Keeps state_class: total_increasing for full statistics continuity.
    • Maintains historical data and state restoration after restarts.
    • No unit-of-measurement changes, ensuring compatibility with recorded statistics.

βš™οΈ Code Quality

  • Cleaned unused imports and validated Ruff and Mypy compliance (no warnings or errors).
  • Improved defensive programming in the constructor (__init__) for better resilience.
  • Preserved identical logic for counting, resetting, and daily scheduling.

🎨 Visual Updates

  • Updated visual assets for improved clarity and consistency with Home Assistant:
    • icon.png
    • icon@2x.png
    • logo.png
    • logo@2x.png

🧩 Result

The integration is now fully stable and backward compatible.
All counters and entities load correctly, previous statistics remain intact,
and users can safely upgrade without losing history or functionality.