Repository navigation
Conversation
|
Confirming this fix is still needed, tested today (2026-10-12) on an Ariston NUOS PLUS S2 WIFI 200L FS with
After patching my local copy to send This matches the root cause described here, so it would be great to get this merged and released. |
| self.gw, NuosSplitOperativeMode[operation_mode], old_value | ||
| ) | ||
| self.data[NuosSplitProperties.MODE] = NuosSplitOperativeMode[ | ||
| self.data[NuosSplitProperties.OP_MODE] = NuosSplitOperativeMode[ |
There was a problem hiding this comment.
Please update test_nuos_split_properties_sync_async_and_missing_state_defaults with this OP_MODE cache change. Its fixture omits MODE but the sync and async checks still index that key after setters, so this change makes the existing suite raise KeyError and leaves the getter-backed cache unverified. Assert OP_MODE/water_heater_mode_value and verify the previous mode passed to each API call.
| """Set water heater operation mode""" | ||
| self.api.set_nuos_mode(self.gw, NuosSplitOperativeMode[operation_mode]) | ||
| self.data[NuosSplitProperties.MODE] = NuosSplitOperativeMode[ | ||
| old_value = self.water_heater_mode_value if self.water_heater_mode_value is not None else 1 |
There was a problem hiding this comment.
Please avoid hardcoding old=1 when the cached mode is unknown. Nuos value 1 is COMFORT, so a newly created device or empty cache sends COMFORT as the previous value regardless of the device's actual mode; since this endpoint's old field is the previous mode, the write can be rejected. Fetch the current state before both writes or handle an unknown previous value explicitly.
Problem
Setting the operative mode on NuosSplit devices (e.g., Nuos Plus S2) via
set_nuos_mode()/async_set_nuos_mode()returned{"success": true}but the mode never actually changed.Root Cause
The Ariston API requires the
"old"field in the request payload to apply operative mode changes. The library was only sending{"new": value}.Fix
set_nuos_mode()andasync_set_nuos_mode()inariston_api.pyto accept and include theold_valueparameterset_water_heater_operation_mode()andasync_set_water_heater_operation_mode()innuos_split_device.pyto pass the current mode value asoldBefore
After
Related to fustom/ariston-remotethermo-home-assistant-v3#407