|
2 | 2 | Changelog |
3 | 3 | ========= |
4 | 4 |
|
| 5 | +Version 8.0.0 (2026-05-06) |
| 6 | +=========================== |
| 7 | + |
| 8 | +**BREAKING CHANGES**: ``.on()`` event handler callbacks now receive a single typed |
| 9 | +event dataclass instead of positional arguments. ``MqttDeviceController`` is no longer |
| 10 | +accessible as ``.control`` on ``NavienMqttClient``; all control methods are now |
| 11 | +available directly on the client. |
| 12 | + |
| 13 | +Breaking Changes |
| 14 | +---------------- |
| 15 | +- **Typed event payloads**: All ``.on()`` event handler callbacks now receive a single |
| 16 | + typed event dataclass instance. The dataclasses are exported from |
| 17 | + ``nwp500.mqtt_events``. |
| 18 | + |
| 19 | + .. code-block:: python |
| 20 | +
|
| 21 | + # OLD (removed) |
| 22 | + mqtt.on("temperature_changed", lambda old, new: print(old, new)) |
| 23 | + mqtt.on("connection_resumed", lambda rc, sp: print(rc, sp)) |
| 24 | +
|
| 25 | + # NEW |
| 26 | + mqtt.on("temperature_changed", lambda e: print(e.old_temperature, e.new_temperature)) |
| 27 | + mqtt.on("connection_resumed", lambda e: print(e.return_code, e.session_present)) |
| 28 | +
|
| 29 | +- **``MqttDeviceController`` no longer public**: ``NavienMqttClient`` no longer exposes |
| 30 | + a ``.control`` attribute. All control methods are now available directly on the |
| 31 | + client. |
| 32 | + |
| 33 | + .. code-block:: python |
| 34 | +
|
| 35 | + # OLD (removed) |
| 36 | + await mqtt.control.set_temperature(device, 50) |
| 37 | +
|
| 38 | + # NEW |
| 39 | + await mqtt.set_temperature(device, 50) |
| 40 | +
|
| 41 | +Added |
| 42 | +----- |
| 43 | +- **New control methods**: Nine previously unimplemented ``CommandCode`` values now have |
| 44 | + full implementations: ``check_firmware``, ``commit_firmware``, ``reconnect_wifi``, |
| 45 | + ``reset_wifi``, ``set_freeze_protection_temperature``, ``run_smart_diagnostic``, |
| 46 | + ``enable_intelligent_reservation``, ``disable_intelligent_reservation``, and |
| 47 | + ``set_water_program_reservation``. |
| 48 | +- **Typed subscription methods**: ``subscribe_reservation``, |
| 49 | + ``subscribe_weekly_reservation``, and ``subscribe_recirculation`` return typed |
| 50 | + responses directly without requiring raw MQTT event handlers. |
| 51 | +- **New protocol models**: ``WeeklyReservationSchedule``, ``WeeklyReservationEntry``, |
| 52 | + ``RecirculationSchedule``, ``RecirculationScheduleEntry``, and ``OtaCommitPayload``. |
| 53 | +- **``DeviceStateTracker``**: State change detection extracted into a dedicated class |
| 54 | + in ``nwp500.mqtt.state_tracker`` with per-device tracking keyed by MAC address. |
| 55 | +- **``MQTT_PROTOCOL_VERSION`` constant**: Protocol version is now a named constant in |
| 56 | + ``nwp500.config`` rather than a hardcoded integer in the command payload builder. |
| 57 | +- **``response_ack_topic()``**: New method on ``MqttTopicBuilder`` for control command |
| 58 | + acknowledgement topics. |
| 59 | + |
| 60 | +Changed |
| 61 | +------- |
| 62 | +- **Unit conversion redesign**: Temperature, flow rate, and volume fields in |
| 63 | + ``DeviceStatus`` and ``DeviceFeature`` now store raw device values as ``*_raw: int`` |
| 64 | + fields and expose converted values via lazy computed properties. Conversion happens at |
| 65 | + access time rather than during Pydantic deserialization, preserving the original |
| 66 | + device value in all cases. |
| 67 | +- **Models split into subpackage**: ``nwp500.models`` is now a package |
| 68 | + (``nwp500/models/``) with modules for status, schedule, TOU, and MQTT models. Public |
| 69 | + imports from ``nwp500.models`` are unchanged. |
| 70 | +- **Topic building centralised**: All MQTT topic construction now goes through |
| 71 | + ``MqttTopicBuilder``. Hardcoded topic strings removed from ``control.py``, |
| 72 | + ``reservations.py``, and ``cli/handlers.py``. |
| 73 | +- **``set_vacation_days`` delegates to ``set_dhw_mode``**: The method now calls |
| 74 | + ``set_dhw_mode(device, DhwOperationSetting.VACATION, vacation_days=days)`` directly. |
| 75 | +- **Per-device state tracking**: ``_previous_status`` changed from a single |
| 76 | + ``DeviceStatus | None`` to a ``dict[str, DeviceStatus]`` keyed by MAC address, |
| 77 | + preventing spurious state-change events when multiple devices are connected. |
| 78 | +- **Unit system stored as instance variable**: ``NavienAPIClient``, |
| 79 | + ``NavienMqttClient``, and ``NavienAuthClient`` no longer call ``set_unit_system()`` |
| 80 | + as a constructor side-effect. |
| 81 | +- **``NavienBaseModel`` consolidated**: Duplicate definitions in ``auth.py`` and |
| 82 | + ``models.py`` merged into a single definition in ``nwp500._base``. |
| 83 | + |
5 | 84 | Version 7.4.10 (2026-04-13) |
6 | 85 | =========================== |
7 | 86 |
|
|
0 commit comments