github JeffSteinbok/hass-dreo v1.7.1
Release v1.7.1 - Bug Fixes and Reliability Improvements

latest releases: v1.11.11, v1.11.10, v1.11.9...
pre-release8 months ago

Patch release focused on bug fixes and reliability improvements found during a comprehensive code review. All changes include test coverage.

๐Ÿ”ด Critical Fixes

  • Fix unchecked dict access in heater timer parsing (#550) โ€” timeron["du"] crashed with TypeError when timer data was None or missing the du key. Now uses safe isinstance check and .get().

  • Fix WebSocket deadlock from threading.Lock in async code (#549) โ€” The WebSocket send lock (threading.Lock) was used inside async coroutines. When two coroutines contended for the lock, it blocked the entire event loop, causing a deadlock. Replaced with asyncio.Lock. Also added proper WS close + thread join on shutdown, error handling for connection failures, and retry logic for send failures.

๐ŸŸ  High-Priority Fixes

  • Fix inverted range validation for heater htalevel/ecolevel (#546) โ€” Chained comparison min > value > max was always False, so invalid values were silently sent to the device. Fixed to not (min <= value <= max).

  • Fix fan turn_on ignoring percentage and preset_mode (#547) โ€” HA service calls like fan.turn_on(percentage=50) would power on but not apply the speed or preset.

  • Fix duplicate sensor key collision (#551) โ€” Two sensors shared the key "Use since cleaning", causing the humidifier work-time sensor to be silently dropped. Renamed to "Use since cleaning HM". Note: Humidifier work-time sensor entities may need to be re-added after update.

  • Fix getattr on dict in get_device_range (#552) โ€” getattr() was used on device_ranges (a dict), so per-model range overrides for Number entities were silently ignored. Changed to dict.get().

  • Fix power-on key None guard in fan base (#553) โ€” If neither POWERON_KEY nor FANON_KEY was in the initial state, the power-on key became None, causing errors when toggling the fan.

  • Add exception handling in _do_callbacks (#554) โ€” A single bad callback would crash _do_callbacks() and prevent all remaining callbacks from executing. Now each callback is wrapped in try/except.

  • Add access_token and deviceId to diagnostics redaction (#548) โ€” These sensitive fields were not being redacted in diagnostic dumps.

๐ŸŸก Medium Fixes

  • Fix fan speed validation lower bound (#555) โ€” Speed setter hardcoded 1 as minimum instead of using the device's actual _speed_range[0].

  • Fix logger namespace typo in manifest.json (#556) โ€” "custom_compoments" โ†’ "custom_components". This typo prevented HA's debug logging UI from capturing integration logs.

  • Fix RGB tuple length validation (#557) โ€” _clamp_rgb_tuple now validates that the input has exactly 3 elements.

  • Fix name_from_value return type annotation (#557) โ€” Changed -> str to -> str | None to match actual behavior.

  • Fix device_ranges type annotation (#557) โ€” Changed dict[range] to dict[str, tuple] to reflect actual usage.

๐Ÿงช Test Coverage

  • 72 new tests added (#545, merged in v1.7.0 cycle) covering config_flow.py, diagnostics.py, commandtransport.py, and __init__.py
  • All fixes include corresponding test coverage
  • Total test count: 348+ passing tests

Full Changelog: v1.7.0...v1.7.1

Don't miss a new hass-dreo release

NewReleases is sending notifications on new releases.