Skip to content

v1.0.5 — Code quality, performance, and stability improvements (#26-#40) #41

@traktore-org

Description

@traktore-org

Summary

Batch release of 15 improvement issues covering performance, stability, usability, accessibility, and code quality. All changes tested on HA-TEST with full validation pass (199 entities, 0 errors).

Changes

Performance (#26, #30)

  • Cache forecast source and surplus window between update cycles
  • Fix memory leaks and DOM thrashing in dashboard cards (debounced updates, listener cleanup)

Stability (#27, #28, #34, #37, #39, #40)

  • Add exponential backoff to EV device retry (10s→320s, max 10 retries)
  • Add error recovery for battery protection and load management failures
  • Narrow exception handling throughout coordinator (specific types instead of bare except Exception)
  • Add storage validation and migration rollback safety
  • Entity consistency: availability on number entities, state class last_reset
  • Load management: user-set priority preservation, discovery retry, shed list cleanup

Usability (#32, #35, #36, #38)

  • Validate entity IDs and sensor values during config flow
  • Add notification deduplication and flap suppression (60s stability requirement)
  • Replace hardcoded entity IDs with configurable references (consts/core.py)
  • Improve dashboard card error states (unavailable entity indicator)

Code Quality (#29, #33)

  • Reduce coordinator update method complexity (CC ~25 → ~12)
  • Extract shared constants and utilities across dashboard cards (sem-shared.js)

Accessibility (#31)

  • Add ARIA labels, role attributes, aria-pressed to dashboard cards

Commits

Linked to individual issues: #26, #27, #28, #29, #30, #31, #32, #33, #34, #35, #36, #37, #38, #39, #40

Test Plan

  • Deploy to HA-TEST via deploy-test.sh
  • Run validate-sem.sh — all 7 checks passed
  • 199 entities, 0 errors in logs
  • Coordinator update cycles: 0.001-0.037s (success: True)
  • Deploy to HA-PROD

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions