Builds a facade manager bound to the given Home API client; facades it returns share this reference.
Home API client.
Returns the cached facade for the given Home device, lazily creating
one on first access. The overloads preserve type-narrowing: callers
who already discriminated instance via isAta()/isAtw() get the
matching facade type back without runtime checks.
Registry device to wrap, or undefined.
The facade, or null when no instance was supplied.
Returns the cached facade for the given Home device, lazily creating
one on first access. The overloads preserve type-narrowing: callers
who already discriminated instance via isAta()/isAtw() get the
matching facade type back without runtime checks.
Registry device to wrap, or undefined.
The facade, or null when no instance was supplied.
Returns the cached facade for the given Home device, lazily creating
one on first access. The overloads preserve type-narrowing: callers
who already discriminated instance via isAta()/isAtw() get the
matching facade type back without runtime checks.
The facade, or null when no instance was supplied.
Returns the cached facade for the given Home device, lazily creating
one on first access. The overloads preserve type-narrowing: callers
who already discriminated instance via isAta()/isAtw() get the
matching facade type back without runtime checks.
Optionalinstance: HomeDevice<HomeAtaDeviceData> | HomeDevice<HomeAtwDeviceData>
Registry device to wrap, or undefined.
The facade, or null when no instance was supplied.
Returns the cached ATA group facade for the given /context building,
lazily creating one on first access. Resolves to null while the
registry holds no ATA device of that building (unknown id, or a
building emptied by a sync) — stale cache entries are dropped.
Identifier of the /context building.
The building facade, or null.
Groups registry devices by building — the Home counterpart of the
Classic manager's getBuildings.
Optionalparams: { type?: HomeDeviceType }
Optional filter.
Optionaltype?: HomeDeviceTypeConnection-type discriminator; omitted merges both connection types per building.
One name-sorted entry per building.
Resolves a device facade by id — the by-id twin of get.
Device identifier.
The facade, or null when the id is unknown.
Flattens the registry into the picker zone list (grouped:
name-sorted buildings each followed by their own name-sorted
devices; Classic's getZones sorts its flat list globally).
Optionalparams: { type?: HomeDeviceType }
Optional filter.
Optionaltype?: HomeDeviceTypeConnection-type discriminator; omitted covers both connection types.
The flattened zone nodes.
Batch frost-protection update for the given Home devices: groups them by type, clamps the bounds into range, and issues one API write. All ids must belong to this manager's account.
Target device ids.
The new frost-protection settings.
A protection update to apply — the write contract shared by frost (Classic and Home) and overheat (Home ATA) protection, clamped by the sibling helpers before it reaches the wire.
Structurally identical to ProtectionState today, and kept separate on purpose: the read twin gains whatever the wire starts reporting, the write twin only what the units accept. Its holiday counterparts already diverge that way — HolidayModeState nulls a bound the wire left unset, where its update requires both.
ReadonlyisEnabled: booleanWhether the protection is on.
Readonlymax: numberRequested upper bound, in °C.
Readonlymin: numberRequested lower bound, in °C.
Batch holiday-mode update for the given Home devices: groups them by type and issues one API write. Mirror of updateFrostProtection for the holiday window. All ids must belong to this manager's account.
Target device ids.
The new holiday-mode window.
A holiday-mode window to apply. startDate/endDate are ISO 8601
wall-clock strings; both are ignored when isEnabled is false. The
start is always explicit (the Home API carries no timezone context to
anchor a "now" default), so callers pass the full window.
ReadonlyendDate: stringWindow end (ISO 8601). Ignored when isEnabled is false.
ReadonlyisEnabled: booleanWhether holiday mode is on.
ReadonlystartDate: stringWindow start (ISO 8601). Ignored when isEnabled is false.
Batch overheat-protection update for the given Home devices: keeps only the ATA ids (the feature is ATA-only — the official app never sends ATW ids), clamps the bounds into range, and issues one API write when at least one ATA id remains. All ids must belong to this manager's account.
Target device ids (non-ATA ids are dropped).
The new overheat-protection settings.
A protection update to apply — the write contract shared by frost (Classic and Home) and overheat (Home ATA) protection, clamped by the sibling helpers before it reaches the wire.
Structurally identical to ProtectionState today, and kept separate on purpose: the read twin gains whatever the wire starts reporting, the write twin only what the units accept. Its holiday counterparts already diverge that way — HolidayModeState nulls a bound the wire left unset, where its update requires both.
ReadonlyisEnabled: booleanWhether the protection is on.
Readonlymax: numberRequested upper bound, in °C.
Readonlymin: numberRequested lower bound, in °C.
Lazily creates and caches Home device facade instances using a WeakMap keyed by model reference. Mirrors the classic ClassicFacadeManager pattern.