Repository navigation
Add Nuos Split plant mode (Manual / Program) - #203
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vn98CDwmeppfpaPgDUykC
| api._r2_login = MagicMock() # type: ignore[method-assign] | ||
| api._r2_get_slp_plant_data = MagicMock(return_value=PLANT) # type: ignore[method-assign] | ||
| api._r2_post_set_data = MagicMock() # type: ignore[method-assign] | ||
| api.set_nuos_plant_mode_via_r2("gw-1", NuosSplitPlantMode.MANUAL) |
There was a problem hiding this comment.
The fixture already starts in MANUAL, so this test still passes if the sync setter ignores the requested mode. Could you request PROGRAM and assert that the POST targets gw-1, sends plantMode=2, and preserves opMode=1?
There was a problem hiding this comment.
Good catch, fixed in b3e58df: the sync test now requests PROGRAM and asserts a single POST to gw-1 with plantMode=2 and opMode=1 preserved.
| self._r2_login() | ||
| try: | ||
| plant_data = self._r2_get_slp_plant_data(gw_id) | ||
| except ConnectionException: |
There was a problem hiding this comment.
Could you add a retry test for both the sync and async plant-mode setters? Have the first read raise ConnectionException, then verify that the setter logs in again, rereads the plant data, and posts exactly once using the fresh values. The full suite still passes with both retry paths removed.
There was a problem hiding this comment.
Added test_api_sync_retry_after_failed_read and test_api_async_retry_after_failed_read in b3e58df. The first read raises ConnectionException; the tests assert a second login, a reread, and exactly one POST built from the fresh plant data (the second read returns opMode=3 / comfortTemp=60 so stale values would fail). I checked that both tests fail when either retry path is removed, and that the sync/async tests fail if the requested mode is ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vn98CDwmeppfpaPgDUykC
Adds Manual / Program (plant mode) support for Velis Nuos Split, requested in fustom/ariston-remotethermo-home-assistant-v3#453.
Context
NuosSplitPlantMode(MANUAL=1, PROGRAM=2) was already defined but unused.modeinslpPlantData.PlantHomeSlp/SetDataenvelope used for GREEN already carriesviewModel.plantMode, but it was only echoed back.Changes
_build_nuos_r2_payload(plant_data, op_mode=None, plant_mode=None):Nonekeeps the current cloud value, so existing callers are unchanged.set_nuos_plant_mode_via_r2/async_set_nuos_plant_mode_via_r2: same login/read/retry flow as the GREEN write.AristonNuosSplitDevice:water_heater_plant_mode_value,water_heater_plant_mode_text,water_heater_plant_mode_texts,set_water_heater_plant_mode/async_set_water_heater_plant_mode.tests/test_nuos_plant_mode.py.Behaviour
Plant mode and operative mode are independent, as in the official app. On a real device, Manual Comfort → Program shows "Program Comfort". Changing the plant mode keeps
opMode, and changingopModekeeps the plant mode.Not verified yet
The write has not been checked against the live cloud. Testing needs the companion integration PR plus a release of this library.
🤖 Generated with Claude Code
https://claude.ai/code/session_017vn98CDwmeppfpaPgDUykC