Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions .agent/workflows/pre-completion-testing.md

This file was deleted.

3 changes: 0 additions & 3 deletions .bandit

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ jobs:
with:
python-version: '3.13'

- name: Install tox
- name: Install ruff
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install ruff

- name: Run bandit
run: tox -e bandit
- name: Run security checks (ruff bandit)
run: ruff check --select S src/

test:
name: Test on Python ${{ matrix.python-version }}
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ venv*/
.secrets
reference/*
resources/*

# Tool caches
.mypy_cache/
.ruff_cache/
.bandit
.agent/
10 changes: 9 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Changelog
=========

Version 7.5.0 (2026-02-16)
Version 7.4.7 (2026-02-17)
==========================

Added
Expand All @@ -15,11 +15,19 @@ Added
- **CLI ``tou plan``**: View converted rate plan details with decoded pricing (``nwp500 tou plan 94903 "EV Rate A"``).
- **CLI ``tou apply``**: Apply a rate plan to the water heater with optional ``--enable`` flag to activate TOU via MQTT.
- **CLI Reservations Table Output**: ``nwp-cli reservations get`` now displays reservations as a formatted table by default with global status indicator (ENABLED/DISABLED). Use ``--json`` flag for JSON output.
- **CLI ``anti-legionella set-period``**: New subcommand to change the Anti-Legionella cycle period (1-30 days) without toggling the feature. Use ``nwp-cli anti-legionella set-period 7`` to update cycle period.

Changed
-------
- **``examples/advanced/tou_openei.py``**: Rewritten to use the new ``OpenEIClient`` and ``convert_tou()``/``update_tou()`` library methods instead of inline OpenEI API calls and client-side conversion.

Fixed
-----
- **Week Bitfield Encoding (CRITICAL)**: Fixed MGPP week bitfield encoding to match NaviLink APK protocol. Sunday is now correctly bit 7 (128), Monday bit 6 (64), ..., Saturday bit 1 (2); bit 0 is unused. Affects all reservation and TOU schedule operations. Verified against reference captures.
- **Enable/Disable Convention**: Fixed reservation and TOU enable/disable flags to use standard device boolean convention (1=OFF, 2=ON) instead of inverted logic. This aligns with other device binary sensors and matches app behavior. Global reservation status now correctly shows DISABLED when ``reservationUse=1``.
- **Reservation Set Command Timeout**: Fixed ``reservations set`` subscription pattern that had extra wildcards preventing response matching. Command now receives confirmations correctly.
- **Intermittent Fetch Bug**: Tightened MQTT topic filter for reservation fetch from ``/res/`` to ``/res/rsv/`` with content validation to prevent false matches on unrelated response messages.

Version 7.4.6 (2026-02-13)
==========================

Expand Down
8 changes: 8 additions & 0 deletions docs/api/nwp500.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ nwp500.mqtt\_events module
:show-inheritance:
:undoc-members:

nwp500.openei module
--------------------

.. automodule:: nwp500.openei
:members:
:show-inheritance:
:undoc-members:

nwp500.temperature module
-------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/advanced_features_explained.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,5 +499,5 @@ See Also

* :doc:`../protocol/data_conversions` - Temperature field conversions (HalfCelsiusToF, DeciCelsiusToF)
* :doc:`../protocol/device_status` - Complete device status field reference
* :doc:`scheduling_features` - Reservation and TOU integration points
* :doc:`scheduling` - Scheduling and automation guide
* :doc:`../python_api/models` - DeviceStatus model field definitions
Loading
Loading