MELCloud & MELCloud Home API for Node.js - v48.2.0
    Preparing search index...

    Class HomeFacadeManager

    Lazily creates and caches Home device facade instances using a WeakMap keyed by model reference. Mirrors the classic ClassicFacadeManager pattern.

    Index
    • 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.

      Parameters

      • id: string

        Identifier of the /context building.

      Returns HomeBuildingAtaFacade | null

      The building facade, or null.

    • 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).

      Parameters

      • Optionalparams: { type?: HomeDeviceType }

        Optional filter.

        • Optionaltype?: HomeDeviceType

          Connection-type discriminator; omitted covers both connection types.

      Returns HomeFlatZone[]

      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.

      Parameters

      • deviceIds: readonly string[]

        Target device ids.

      • root0: ProtectionUpdate

        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: boolean

          Whether the protection is on.

        • Readonlymax: number

          Requested upper bound, in °C.

        • Readonlymin: number

          Requested lower bound, in °C.

      Returns Promise<void>

    • 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.

      Parameters

      • deviceIds: readonly string[]

        Target device ids.

      • root0: HolidayModeUpdate

        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: string

          Window end (ISO 8601). Ignored when isEnabled is false.

        • ReadonlyisEnabled: boolean

          Whether holiday mode is on.

        • ReadonlystartDate: string

          Window start (ISO 8601). Ignored when isEnabled is false.

      Returns Promise<void>

    • 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.

      Parameters

      • deviceIds: readonly string[]

        Target device ids (non-ATA ids are dropped).

      • root0: ProtectionUpdate

        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: boolean

          Whether the protection is on.

        • Readonlymax: number

          Requested upper bound, in °C.

        • Readonlymin: number

          Requested lower bound, in °C.

      Returns Promise<void>