Repository navigation
fix(nuos-split): correct NuosSplitOperativeMode values and OP_MODE write target - #183
agustinscaz wants to merge 4 commits into
Conversation
Removed COMFORT mode and added GREEN_PLUS mode to NuosSplitOperativeMode.
|
@agustinscaz I will review this. I'm making test suite for this repo before that. :) |
|
Fix the tests @agustinscaz I will review after that. Ping me here |
astrinh0
left a comment
There was a problem hiding this comment.
Required: Keep COMFORT = 1 while adding GREEN_PLUS = 6. This enum supplies the Nuos Split mode options and display text. Removing COMFORT makes API value 1 display as UNKNOWN, and set_water_heater_operation_mode("COMFORT") raises KeyError before the API call. Add GREEN_PLUS without dropping the existing mode.
| """NuosSplit operative mode enum""" | ||
|
|
||
| GREEN = 0 | ||
| COMFORT = 1 |
There was a problem hiding this comment.
Required: Keep COMFORT = 1 while adding GREEN_PLUS = 6. This enum supplies the Nuos Split mode options and display text. Removing COMFORT makes API value 1 display as UNKNOWN, and set_water_heater_operation_mode("COMFORT") raises KeyError before the API call. Add GREEN_PLUS without dropping the existing mode.
On Ariston NUOS PLUS S2 WIFI 200L FS (heat pump water heater,
WheType.NuosSplit), changing the operation mode from Home Assistant always resulted in a400error from the API:The root cause is that
NuosSplitOperativeModeinconst.pydefines incorrect values for this device:COMFORT = 1does not exist on the NUOS Split — the API rejects it with 400GREEN_PLUS = 6is completely missing, so it was impossible to select that mode from HAAdditionally, both
set_water_heater_operation_modeandasync_set_water_heater_operation_modeinnuos_split_device.pywere writing the new mode value toNuosSplitProperties.MODE("mode") instead ofNuosSplitProperties.OP_MODE("opMode"). Sincewater_heater_mode_valuereads fromOP_MODE, the UI would not reflect the mode change until the next poll.Investigation
I reverse-engineered the Ariston web app API calls (
/R2/PlantHomeSlp/SetData/) while switching between each mode in the browser, and captured the actualopModevalues sent by the official web interface:viewModel.opMode0236This confirms the correct enum values and reveals that
COMFORT = 1is not a valid mode for this device family, andGREEN_PLUS = 6was entirely absent from the library.Changes
ariston/const.py: replacedCOMFORT = 1withGREEN_PLUS = 6inNuosSplitOperativeModeariston/nuos_split_device.py: fixed the mode write target fromNuosSplitProperties.MODEtoNuosSplitProperties.OP_MODEin both the sync and async operation mode settersTested on
ariston==0.19.9