Skip to content

fix: keep Nuos operation mode cache in sync with mode getter#181

Open
dpmworld wants to merge 1 commit into
fustom:mainfrom
dpmworld:fix/nuos-operation-mode-cache-desync
Open

fix: keep Nuos operation mode cache in sync with mode getter#181
dpmworld wants to merge 1 commit into
fustom:mainfrom
dpmworld:fix/nuos-operation-mode-cache-desync

Conversation

@dpmworld
Copy link
Copy Markdown

@dpmworld dpmworld commented May 6, 2026

AristonNuosSplitDevice.set_water_heater_operation_mode (and its async counterpart) wrote the new operative mode into NuosSplitProperties.MODE (the generic Velis mode field), but water_heater_mode_value reads from NuosSplitProperties.OP_MODE (the Nuos-specific opMode field).

The Nuos cloud payload exposes both fields with distinct semantics: mode is the plant mode shared with other Velis devices, while opMode is the Nuos operative mode (GREEN / COMFORT / FAST / IMEMORY). The set_nuos_mode API call posts to /operativeMode, so the server only updates opMode. Mirroring mode in the local cache therefore had two unwanted effects:

  • water_heater_mode_value continued to return the stale opMode value until the next update_state() round-trip.
  • The unrelated mode field was clobbered with an opMode value, briefly corrupting any caller reading the plant mode from the cache before the next refresh.

This is the same class of bug that #180 fixes for the temperature setter; the operation mode setter just slipped through the same review.

`AristonNuosSplitDevice.set_water_heater_operation_mode` (and its
async counterpart) wrote the new operative mode into
`NuosSplitProperties.MODE` (the generic Velis `mode` field), but
`water_heater_mode_value` reads from `NuosSplitProperties.OP_MODE`
(the Nuos-specific `opMode` field).

The Nuos cloud payload exposes both fields with distinct semantics:
`mode` is the plant mode shared with other Velis devices, while
`opMode` is the Nuos operative mode (GREEN / COMFORT / FAST /
IMEMORY). The `set_nuos_mode` API call posts to `/operativeMode`, so
the server only updates `opMode`. Mirroring `mode` in the local cache
therefore had two unwanted effects:

* `water_heater_mode_value` continued to return the stale `opMode`
  value until the next `update_state()` round-trip.
* The unrelated `mode` field was clobbered with an `opMode` value,
  briefly corrupting any caller reading the plant mode from the cache
  before the next refresh.

This is the same class of bug that fustom#180 fixes for the temperature
setter; the operation mode setter just slipped through the same
review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant