What's Changed
Bug Fixes
- Fix State Restoration for Calculated Sensors: Fixed an issue where calculated sensor entities (e.g.,
OPERATING_VOLTAGE_LEVEL) were not restored after Home Assistant restart. The problem occurred becauseCalculatedDataPointentities reportedis_valid=True(source data points refreshed from cache) even whenvalue=None(no computed value yet), which prevented state restoration. The restore logic now also triggers whenvalue is None, ensuring calculated sensors display their last known value until fresh data arrives.
Internal
- Type Safety Improvements: Added
@overridedecorator to 100+ methods across all entity platforms to explicitly mark methods overriding parent class methods. AddedFinalannotation to 15EVENT_*constants inconst.py. These changes improve code clarity and enable better static analysis.
Bump aiohomematic to 2026.1.51
New Features
- Contract Tests for Regression Prevention: Added extensive contract testing infrastructure with 500+ tests specifically designed to prevent regressions during AI-assisted refactoring. Coverage includes backend capabilities, state machines, connection recovery, event systems, lifecycle methods, enums, configuration classes, exception hierarchies, protocol interfaces, hub entities, subscription APIs, and device/channel protocols.
Changed
- Pydantic Model Conversions: Multiple configuration classes migrated to Pydantic
BaseModelwith frozen immutability includingTimeoutConfig,InterfaceConfig,CentralConfig,DeviceConfig,ProfileConfig, andBackendCapabilities. - Type Safety Improvements: Added
@uniquedecorator to 70+ enum classes to prevent accidental duplicate values,@overridedecorator to explicitly mark overridden methods, andFinalannotations to key constants.
Bug Fixes
- Fix Client Reconnection from INITIALIZED State: Fixed an issue where clients stuck in INITIALIZED state couldn't be reconnected. The state machine now permits
INITIALIZED → DISCONNECTEDtransitions enabling recovery. - Fix JSON Parsing Control Characters: Fixed
JSONDecodeErrorby sanitizing JSON-RPC responses, escaping control characters (U+0000 to U+001F) to proper\uXXXXsequences.