Builds the registry.
Options bag.
Optionaltimezone?: stringIANA timezone threaded into every Device for derogation end dates; defaults to the runtime system timezone.
ReadonlydevicesReturns 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 — the tolerance
HeatzyAPI's /devdata fan-out feeds, one settled leg per device,
so a device that answered /bindings but not /devdata costs
itself and no sibling.
Every binding is expected to be one this SDK models: Device
resolves its product_key in its constructor and THROWS on a key
this SDK predates. The listing boundary (HeatzyAPI.list) is what
guarantees that; a caller synchronizing hand-built bindings owns
the same precondition.
Fresh /bindings entries this SDK models.
Live attribute payloads keyed by did.
Central in-memory registry of all bound Heatzy devices. Synced from the
/bindings+/devdataresponses and queryable by id.Upsert + prune semantics: an existing model is updated in place, a new one created, a stale entry removed. Object identity therefore survives an UPSERT and not a PRUNE — an id that leaves the listing is deleted, and its next appearance is a different object. Facades bind by id for exactly that reason; they must never hold the entity.