Releases: martijndierckx/hydrawise-api
Releases · martijndierckx/hydrawise-api
Release list
v2.0.1
Fixed
- LOCAL zone filter: real configured zones with
lastwaterepoch === 0(never watered) were being silently dropped, returning an empty zone list to consumers. Reverted to the original (pre-2020) heuristic of skipping relays withtype === 110, which is the controller's own marker for unconfigured slots. Regression introduced in commit eb0fe93 (May 2020); preserved across the v2 rewrite. Fixeshomebridge-hydrawiseshowing zero accessories after a controller reset or on a fresh install.
Added
RelayRow.type?: numberfield on the typed LOCAL response.
Install
npm install hydrawise-api@2.0.1Published to the next dist-tag; latest remains on 1.2.1.
v2.0.0
Changelog
2.0.0 (unreleased)
Breaking
- Constructor now throws on missing required fields (was silent in v1).
HydrawiseConfigurationinterface removed; useHydrawiseConfig(discriminated union:{type: 'LOCAL', host, password, user?} | {type: 'CLOUD', key}).commandZone(action, …)narrowed to single-zone actions:ZoneAction.Run | ZoneAction.Stop | ZoneAction.Suspend | 'run' | 'stop' | 'suspend'. Passing an…Allaction is now a compile error.HydrawiseController.id/serialNumber/lastContactWithCloud/statustyped as… | undefined(LOCAL controllers don't populate them).HydrawiseZone.controllertyped asHydrawiseController | undefined.- Minimum Node bumped to 18.20.
Added
ZoneActionenum (Run,Stop,Suspend,RunAll,StopAll,SuspendAll).HydrawiseConfigdiscriminated-union config type.- Typed response interfaces:
LocalStatusResponse,CloudStatusResponse,CloudCustomerDetailsResponse,SetZoneResponse. HydrawiseController.host— populated for LOCAL controllers (used byhomebridge-hydrawiseto compute stable accessory keys).HydrawiseZone.defaultRunDurationis now actually populated for LOCAL zones (was silently dropped by the v1 constructor).- Vitest suite with fetch-stubbed unit tests (35 cases) covering both LOCAL and CLOUD parsing, command shaping, error handling.
Changed
- Replaced
axioswith nativefetch. Zero runtime dependencies. - Internal rewrite: async/await throughout; no more manual Promise wrapping.
- Tightened internal types; eliminated
anyin the API surface.
Removed
axiosruntime dependency.- Manual
Error.captureStackTracefallback (guarded via optional chaining).
1.1.0
Added isRunning detection for cloud connections