MELCloud & MELCloud Home API for Node.js - v23.3.3
    Preparing search index...

    Class ModelRegistry

    Central in-memory registry of all MELCloud models (buildings, floors, areas, devices). Synced from the API response and queryable by ID or parent relationship.

    Index

    Constructors

    Properties

    areas: { getById: (id: number) => AreaModel<number | null> | undefined } = ...
    buildings: { getById: (id: number) => BuildingModel | undefined } = ...
    devices: { getById: (id: number) => DeviceModelAny | undefined } = ...
    floors: { getById: (id: number) => FloorModel | undefined } = ...

    Methods

    • Flatten the building hierarchy into a sorted list of all zones.

      Parameters

      • id: number

        The building ID to look up areas for.

      Returns AreaModel<number | null>[]

      The areas belonging to the specified building.

    • Build a hierarchical zone structure from the registry, optionally filtered by device type.

      Parameters

      • root0: { type?: DeviceType } = {}

        Options object.

        • Optionaltype?: DeviceType

          Optional device type to filter the zone structure.

      Returns BuildingZone[]

      The hierarchical building zone structure.