Skip to content

Commit

Permalink
fix subscribeStates
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucky-ESA committed Sep 4, 2024
1 parent d7ca999 commit eea0044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class LgThinq extends utils.Adapter {
const hash = crypto.createHash("sha256");
this.client_id = hash.update(this.userNumber + (new Date()).getTime()).digest("hex");
}
this.subscribeStates("*");
for (const element of listDevices) {
this.log.info(`Create or update datapoints for ${element.deviceId}`);
this.modelInfos[element.deviceId] = await this.getDeviceModelInfo(element);
Expand All @@ -233,7 +234,6 @@ class LgThinq extends utils.Adapter {
} else if (this.modelInfos[element.deviceId] === "NOK") {
continue;
}
this.subscribeStates("*");
await this.setObjectNotExistsAsync(element.deviceId, {
type: "device",
common: {
Expand Down

0 comments on commit eea0044

Please sign in to comment.