Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
asgothian committed Jan 10, 2025
1 parent ab8a5fc commit 5a64311
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ class Zigbee extends utils.Adapter {
}
if (mappedModel) {
this.query_device_block.push(deviceId);
this.log.debug(`Device query for '${entity.device.ieeeAddr}' started`);
this.log.warn(`Device query for '${entity.device.ieeeAddr}/${entity.device.endpoints[0].ID}' triggered`);
let t;
for (const converter of mappedModel.toZigbee) {
if (converter.hasOwnProperty('convertGet')) {
Expand All @@ -699,17 +699,17 @@ class Zigbee extends utils.Adapter {
const delta = new Date().getTime()-t;
this.log.warn(`Failed to read state (1)'${JSON.stringify(ckey)}'of '${entity.device.ieeeAddr}/${entity.device.endpoints[0].ID} ' after ${delta} ms from query with '${error && error.message ? error.message : 'no error message'}`);
}
t = new Date().getTime();
try {
await converter.convertGet(entity.device, ckey, {});
} catch (error) {
const delta = new Date().getTime()-t;
this.log.warn(`Failed to read state (2)'${JSON.stringify(ckey)}'of '${entity.device.ieeeAddr}' after ${delta} ms from query with '${error && error.message ? error.message : 'no error message'}`);
}
// t = new Date().getTime();

Check failure on line 702 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected indentation of 40 spaces but found 0
// try {

Check failure on line 703 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected indentation of 40 spaces but found 0
// await converter.convertGet(entity.device, ckey, {});

Check failure on line 704 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected indentation of 40 spaces but found 0
// } catch (error) {

Check failure on line 705 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected indentation of 40 spaces but found 0
// const delta = new Date().getTime()-t;

Check failure on line 706 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected indentation of 40 spaces but found 0
// this.log.warn(`Failed to read state (2)'${JSON.stringify(ckey)}'of '${entity.device.ieeeAddr}' after ${delta} ms from query with '${error && error.message ? error.message : 'no error message'}`);

Check failure on line 707 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected indentation of 40 spaces but found 0
// }

Check failure on line 708 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

Expected indentation of 40 spaces but found 0
}
}
}
this.log.debug(`Device query for '${entity.device.ieeeAddr}' done`);
this.log.warn(`Device query for '${entity.device.ieeeAddr}' complete`);
const idToRemove = deviceId;
setTimeout(() => {
const idx = this.query_device_block.indexOf(idToRemove);
Expand Down

0 comments on commit 5a64311

Please sign in to comment.