Migration Guides¶
This section contains guides for upgrading between major versions of aiohomematic and handling breaking changes.
Current Version¶
The current version is documented in the Changelog.
Migration Philosophy¶
aiohomematic follows these principles for breaking changes:
- Minimize breaking changes - Prefer deprecation warnings before removal
- Clear documentation - Document all breaking changes with migration paths
- Semantic versioning - Major version bumps for breaking API changes
Breaking Changes by Version¶
2026.x¶
| Version | Change | Migration |
|---|---|---|
2025.x¶
The 2025 series introduced the modern EventBus-based architecture:
| Version | Change | Migration |
|---|---|---|
| 2025.12 | EventBus replaces legacy callbacks | Use subscribe_to_* methods |
| 2025.11 | Protocol-based DI throughout | Update custom extensions |
Common Migration Tasks¶
Updating Event Subscriptions¶
Old pattern (legacy):
New pattern (recommended):
from aiohomematic.central.events import DataPointValueReceivedEvent
async def handler(*, event: DataPointValueReceivedEvent) -> None:
print(event.value)
unsubscribe = central.event_bus.subscribe(
event_type=DataPointValueReceivedEvent,
handler=handler,
)
Updating Protocol Imports¶
Old pattern:
New pattern:
from aiohomematic.interfaces import (
CentralInfoProtocol,
DeviceProviderProtocol,
)
# Use protocol interfaces for dependencies
class MyComponent:
def __init__(
self,
*,
central_info: CentralInfoProtocol,
device_provider: DeviceProviderProtocol,
) -> None:
...
Deprecation Warnings¶
When a feature is deprecated, you'll see warnings in the logs. These indicate:
- What is deprecated
- Why it's being removed
- What to use instead
- When it will be removed
Example:
DeprecationWarning: register_callback() is deprecated since 2025.11.
Use event_bus.subscribe() instead. Will be removed in 2026.1.
Testing After Migration¶
After migrating:
- Run tests:
pytest tests/ - Check logs: Look for deprecation warnings
- Verify functionality: Test core use cases
Getting Help¶
If you encounter issues during migration:
- Check the Changelog for detailed notes
- Search GitHub Issues
- Ask in GitHub Discussions
Related Documentation¶
- Changelog - Version history
- Consumer API - Current API patterns
- Event System - Modern event handling