resync
resync — a device whose derived spec can be re-aligned on demand with its upstream source (#459, Q6).
resync — a device whose derived spec can be re-aligned on demand with its upstream source (#459, Q6). Registered by the containers an integration adopted; DeviceFeature.Resyncable (the generic Re-sync button) is derived from it being bound with resync implemented.
The work itself stays where it is: the owning addon's device-adoption provider, reached through deviceManager.adoptionResync (which also owns the "resync from zero" child purge). A provider answers this method by asking for exactly that — see resyncThroughAdoption.
At a glance
| Capability | resync |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | container, workload, weather-station |
| Source | packages/types/src/capabilities/resync.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
resync | mutation | yes | admin |
resync
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
resetToSource | boolean | no | "Resync from zero": purge the accessory children before re-deriving. |
Output
| Field | Type | Required | Description |
|---|---|---|---|
changed | boolean | yes | True when the persisted spec actually changed (children may have been rebuilt). |
rebuiltChildren | number | yes | Number of child devices rebuilt into a new class by this re-sync. |
removedChildren | number | no | Number of accessory children torn down by a resetToSource purge before the provider re-derived the device. 0/absent for a normal incremental re-sync. |