Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
asgothian committed Jan 10, 2025
1 parent eaae381 commit c107f61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,17 +692,17 @@ class Zigbee extends utils.Adapter {
if (converter.hasOwnProperty('convertGet')) {
for (const ckey of converter.key) {
try {
const t = Date.getTime();
const t = new Date().getTime();
await converter.convertGet(entity.device.endpoints[0], ckey, {});
} catch (error) {
const delta = Date.getTime()-t;
const delta = new Date().getTime()-t;

Check warning on line 698 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

't' is not defined
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'}`);
}
try {
const t = Date.getTime();
const t = new Date().getTime();
await converter.convertGet(entity.device, ckey, {});
} catch (error) {
const delta = Date.getTime()-t;
const delta = new Date().getTime()-t;

Check warning on line 705 in main.js

View workflow job for this annotation

GitHub Actions / check-and-lint

't' is not defined
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'}`);
}
}
Expand Down

0 comments on commit c107f61

Please sign in to comment.