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

    Class DeviceV2Facade

    Facade for V2/V4 products: named-attribute control, derogations (boost, vacation), timer and lock switches.

    Hierarchy (View Summary)

    Index
    id: string

    Wire did of the wrapped device.

    product: Product

    Product generation of the wrapped device.

    • get derogationEndString(): string | null

      The running derogation's end, formatted for display in the configured locale — time-of-day for boost and presence, day + month + time for vacation. null when no derogation is running, when its code is one this SDK does not model, or when it was already running at first sight: the wire carries no start timestamp, so the end is only derived when a change is observed (see Device.derogationEndDate).

      Returns string | null

      The formatted end label, or null.

    • get derogationTime(): number

      The derogation duration — minutes for boost, days for vacation.

      Returns number

      The wire derog_time value.

    • 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 isLocked(): boolean

      Whether the physical controls are locked.

      Returns boolean

      true when the child lock is on.

    • get isOn(): boolean

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

      Returns boolean

      true while any heating mode is active.

    • get isTimer(): boolean

      Whether the on-device program timer is running.

      Returns boolean

      true when the timer is on.

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