Skip to content

Commit

Permalink
fix: Fix backup devices missing logging Koenkk/zigbee2mqtt#18706
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Aug 24, 2023
1 parent 79f3e38 commit 9856d83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/adapter/z-stack/adapter/adapter-backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,10 @@ export class AdapterBackup {
const missing = oldBackup.devices.filter((d) =>
d.linkKey && ieeeAddressesInDatabase.includes(`0x${d.ieeeAddress.toString("hex")}`) &&
!backup.devices.find((dd) => d.ieeeAddress === dd.ieeeAddress));
const missingStr = missing.map((d) => `0x${d.ieeeAddress.toString('hex')}`).join(', ');
this.debug(
`Following devices with link key are missing from new backup but present in old backup and database, ` +
`adding them back: ${missing.map((d) => d.ieeeAddress).join(', ')}`
`adding them back: ${missingStr}`
);
backup.devices = [...backup.devices, ...missing];
} catch (error) {
Expand Down

0 comments on commit 9856d83

Please sign in to comment.