feat: add holiday support for Velis Slp (Nuos) devices#182
Open
dpmworld wants to merge 1 commit into
Open
Conversation
The official Ariston NET app exposes a dedicated holiday endpoint for
Slp devices at `POST /api/v2/velis/slpPlantData/{gw}/holiday`, but the
library only exposes a holiday setter on `AristonGalevoDevice` that
targets the Galevo path `/remote/plantData/{gw}/holiday`. There was
no way to schedule, clear, or read the holiday state on a Nuos heat
pump from Python.
This change adds:
* `AristonAPI.set_velis_slp_holiday` (sync + async) that POSTs to the
Slp-specific endpoint with `{"new": holiday_end_date}` (or
`{"new": null}` to clear).
* `AristonNuosSplitDevice.set_holiday(holiday_end)` (sync + async)
that accepts a `datetime.date` (or `None`) and forwards it to the
API after formatting the ISO string the cloud expects, mirroring
the existing Galevo `set_holiday` shape.
* `NuosSplitProperties.HOLIDAY_UNTIL = "holidayUntil"` and two new
read-only properties on `AristonNuosSplitDevice`:
- `holiday_end_date` -> the ISO date string the cloud has on file
(or `None` when no holiday is scheduled)
- `holiday_active` -> `True` when `holidayUntil` is non-null
The Slp payload does not expose a dedicated boolean: an active
holiday is signalled by `holidayUntil` being a non-null string.
* The setters now optimistically write `holidayUntil` back into
`device.data`, so the new properties reflect the requested change
immediately without waiting for an `update_state()` round-trip
(mirrors the cache-update pattern used by the temperature and
operation-mode setters).
The endpoint, the field name `holidayUntil`, and the fact that no
dedicated boolean exists were verified against the official APK
(`com.remotethermo.aristonnet` v6.0.7773.40338): the endpoint string
is present in `classes*.dex`, and the `SlpPlantDataDto` Kotlin model
declares `holidayUntil: String?` with the matching `@SerialName`.
d9f30fa to
cda2c1c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The official Ariston NET app exposes a dedicated holiday endpoint for Slp devices at
POST /api/v2/velis/slpPlantData/{gw}/holiday, but the library only exposes a holiday setter onAristonGalevoDevicethat targets the Galevo path/remote/plantData/{gw}/holiday. There was no way to schedule or clear a holiday on a Nuos heat pump from Python.This change adds:
AristonAPI.set_velis_slp_holiday(sync + async) that POSTs to the Slp-specific endpoint with{"new": holiday_end_date}(or{"new": null}to clear).AristonNuosSplitDevice.set_holiday(holiday_end)(sync + async) that accepts adatetime.date(orNone) and forwards it to the API after formatting the ISO string the cloud expects, mirroring the existing Galevoset_holidayshape.The endpoint and its presence in the app were verified by inspecting the strings table in the official APK's classes.dex files.