MELCloud & MELCloud Home API for Node.js - v60.5.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 building facade for the given /context building, lazily creating one on first access. Any registered device of the building resolves it, whatever its connection type; null only for an unknown id or a building emptied by a sync — stale cache entries are dropped.

      Parameters

      • id: string

        Identifier of the /context building.

      Returns HomeBuildingFacade | null

      The building facade, or null when no registered device belongs to the building.

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

      • update: ProtectionUpdate

        The new frost-protection settings.

      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.

      • update: HolidayModeUpdate

        The new holiday-mode window.

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

      • update: ProtectionUpdate

        The new overheat-protection settings.

      Returns Promise<void>