Heatzy API for Node.js - v21.3.1
    Preparing search index...

    Class DeviceFacade

    Behavioral wrapper around a registry Device for first-generation (V1) products, which only expose the heating mode. Subclasses layer the richer generations on top. Obtain instances through FacadeManager.get — facades are cached per entity.

    Hierarchy (View Summary)

    Index
    id: string

    Wire did of the wrapped device.

    product: Product

    Product generation of the wrapped device.

    • get exists(): boolean

      Whether the underlying device still exists in the registry. Non-throwing introspection: answers false instead of throwing EntityNotFoundError when the registry no longer holds the id. For consumers that keep a cached facade reference and want to detect staleness without a try/catch.

      Returns boolean

      true when the device is still resolvable.

    • get isOn(): boolean

      Whether the device is heating (mode is not stop).

      Returns boolean

      true while any heating mode is active.

    • get name(): string

      The user-facing device name, tracking renames across syncs.

      Returns string

      The wire dev_alias value.

    • Notify the API's onSyncComplete observer, scoped to this device. Invoked by the @syncDevices() decorator after each decorated mutation or read.

      Returns Promise<void>