Skip to content

Commit 731f293

Browse files
committed
fix: guard remaining remote.access writes against missing object (issue #441)
Type id runs only via the EU Data Act path now (VW retired the ID OAuth client), so the remote.* objects are never created, yet onStateChange still mirrors the door lock status into remote.access -> orphaned-state warning on every poll. eaeff2c only guarded the doorLockStatus write. Guard the other two sites (.statusv2.locked, .status...doorsLocked) with getObjectAsync as well, so the mirror is skipped for any type without a remote.access button.
1 parent eaeff2c commit 731f293

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8426,7 +8426,9 @@ class VwWeconnect extends utils.Adapter {
84268426
this.setState(vin + ".remote.maxChargeCurrent", state.val, true);
84278427
}
84288428
if (id.indexOf(".statusv2.locked") !== -1) {
8429-
this.setState(vin + ".remote.access", state.val, true);
8429+
if (await this.getObjectAsync(vin + ".remote.access")) {
8430+
this.setState(vin + ".remote.access", state.val, true);
8431+
}
84308432
}
84318433
if (id.indexOf("climatisationStatus.climatisationState") !== -1) {
84328434
let value = false;
@@ -8463,7 +8465,7 @@ class VwWeconnect extends utils.Adapter {
84638465
}
84648466
}
84658467
if (id.endsWith(".status.vehicle-status.overall.doorsLocked")) {
8466-
if (state.val === "YES" || state.val === "NO") {
8468+
if ((state.val === "YES" || state.val === "NO") && (await this.getObjectAsync(vin + ".remote.access"))) {
84678469
this.setState(vin + ".remote.access", state.val === "YES", true);
84688470
}
84698471
}

0 commit comments

Comments
 (0)