Skip to content

v1.1.0 — Platinum Quality Scale: asyncio-native EtherLynx

Choose a tag to compare

@volschin volschin released this 08 Apr 15:22

What's Changed

Features

  • Async-native EtherLynx protocol: Replaced synchronous socket.socket UDP communication with asyncio.DatagramProtocol (_EtherLynxProtocol). All public methods of DanfossEtherLynx are now async def, eliminating thread pool usage entirely.
  • py.typed marker: Added PEP 561 py.typed file — the package now declares full type annotation support.
  • Platinum quality scale: Added async-dependency, inject-websession (exempt, UDP-only), and strict-typing rules to quality_scale.yaml.

Refactoring

  • Coordinator: Removed async_add_executor_job wrapper — coordinator now calls DanfossEtherLynx natively async.
  • Config flow: Removed ParameterReadError and _try_connect helper — _async_try_connect uses async with DanfossEtherLynx directly.
  • Legacy MQTT bridge (danfoss_ha_bridge.py): Updated to use the async API via a single asyncio.run() call, fixing a stale-transport bug from multiple event loop instantiations.

Bug Fixes

  • Fixed resource leak in coordinator when read_all() raises an exception — transport is now properly closed before re-raising.
  • Fixed UpdateFailed instantiation for Python 3.11 compatibility (keyword arguments not supported in older HA versions).
  • Fixed duplicate TestEtherLynxProtocol test class causing 3 tests to be silently skipped.

Tests

  • 165 tests, 95% coverage
  • Test suite converted to async-native mocking (AsyncMock, async with context managers)
  • Consistent _make_mock_client() helper usage across all error-path tests