Heatzy API for Node.js - v13.0.0
    Preparing search index...

    Class DeviceRegistry

    Central in-memory registry of all bound Heatzy devices. Synced from the /bindings + /devdata responses and queryable by id.

    Upsert + prune semantics: existing models are updated in place, new ones created, stale entries removed — object identity is preserved across syncs so facade references remain valid.

    Index
    • Builds the registry.

      Parameters

      • options: { timezone?: string } = {}

        Options bag.

        • Optionaltimezone?: string

          IANA timezone threaded into every Device for derogation end dates; defaults to the runtime system timezone.

      Returns DeviceRegistry

    devices: { getById: (id: string) => Device | undefined } = ...

    Type Declaration

    • getById: (id: string) => Device | undefined

      Returns the device with the given id, or undefined when no such device is registered.

    • Upserts the device registry from fresh wire data; entries absent from bindings are pruned. A binding whose attributes are missing from attributes keeps its existing model untouched (stale data beats no data) and is skipped when new — mirroring a device that answered /bindings but not /devdata.

      Parameters

      Returns void