@camstack/addon-provider-rademacher 0.2.65 → 0.2.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +9 -1
- package/dist/addon.mjs +9 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -34088,7 +34088,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
34088
34088
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
34089
34089
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
34090
34090
|
await this.healSavedConfig(saved, savedDevices);
|
|
34091
|
-
|
|
34091
|
+
try {
|
|
34092
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
34093
|
+
} catch (err) {
|
|
34094
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
34095
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
34096
|
+
deviceId: saved.id,
|
|
34097
|
+
stableId: saved.stableId
|
|
34098
|
+
} });
|
|
34099
|
+
}
|
|
34092
34100
|
restored.add(saved.id);
|
|
34093
34101
|
};
|
|
34094
34102
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/dist/addon.mjs
CHANGED
|
@@ -34087,7 +34087,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
34087
34087
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
34088
34088
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
34089
34089
|
await this.healSavedConfig(saved, savedDevices);
|
|
34090
|
-
|
|
34090
|
+
try {
|
|
34091
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
34092
|
+
} catch (err) {
|
|
34093
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
34094
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
34095
|
+
deviceId: saved.id,
|
|
34096
|
+
stableId: saved.stableId
|
|
34097
|
+
} });
|
|
34098
|
+
}
|
|
34091
34099
|
restored.add(saved.id);
|
|
34092
34100
|
};
|
|
34093
34101
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-rademacher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.66",
|
|
4
4
|
"description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|