MELCloud & MELCloud Home API for Node.js - v60.5.0
    Preparing search index...

    Class HomeBuildingFacade

    Facade for one /context building: the account-level multi-device target. MELCloud Home has no building endpoint, so the per-target contract is emulated over the members — reads aggregate the synced member states (fields where members diverge fold to null, the mixed marker) and writes fan out to every member, or ride the batch protection endpoints with the members' ids. The ATA group contract (getGroup/updateGroupState) covers the ATA members only, like the official app's group screen.

    Index
    • Builds a facade for one /context building.

      Parameters

      • api: HomeAPIAdapter

        Home API client (carries the device registry).

      • building: { id: string; name: string }

        Identity of the /context building.

        • id: string

          Identifier the target is keyed on.

        • name: string

          Display name captured at build time.

      • getFacade: HomeAtaFacadeResolver

        Resolver returning the cached device facade for an ATA member model (the group contract's clamping path).

      Returns HomeBuildingFacade

    id: string
    • get name(): string

      Display name of the building, as of the latest sync that still holds one of its devices; the last observed name once emptied.

      Returns string

      The user-facing label of the account's building.

    • get supportsOverheat(): boolean

      Whether any member can hold an overheat protection — the feature is ATA-only, so a building without ATA members has nothing to protect.

      Returns boolean

      true when at least one member is an ATA unit.

    • Read the building's aggregated ATA group state: fields where every ATA member agrees carry the shared value, diverging fields fold to null (the wire's mixed marker). No wire call — members' synced states are reused.

      Returns Promise<Result<ClassicGroupState>>

      A success result wrapping the aggregated group state.

    • Member operation modes in the one group vocabulary (Classic-numbered), the ATA members projected through the operation-mode bijection — the same read the Classic zone facades answer, from the synced /context states with no wire call.

      Parameters

      • options: { poweredOnly: boolean }

        Member filter.

        • poweredOnly: boolean

          true keeps only powered-on members.

      Returns ClassicOperationMode[]

      One mode per kept ATA member, in member order.

    • Apply a Classic group state to every ATA member device. The delta is translated to the Home vocabulary once, then fanned out; members already matching it (a tolerated NoChangesError from their update) are fine by definition and do not fail the group write.

      Parameters

      Returns Promise<void>

      The single member failure, or an AggregateError bundling every member failure when more than one PUT rejects.

    • Updates every member's holiday-mode window in one batch write; an enabled window's bounds are projected from the caller's clock onto the wire's UTC.

      Parameters

      Returns Promise<void>

    • Updates the ATA members' overheat protection in one batch write (ATW members are dropped — the feature is ATA-only); resolves without a wire call when the building has no ATA member.

      Parameters

      Returns Promise<void>

    • Powers every member on or off — the per-target fan-out mirror of the device facades' updatePower.

      Parameters

      • isOn: boolean = true

        true to power on, false to power off.

      Returns Promise<void>

      The single member failure, or an AggregateError bundling every member failure when more than one PUT rejects.