Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
asgothian authored Dec 26, 2024
1 parent 3c78551 commit 0cca40f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,12 @@ class Zigbee extends utils.Adapter {
target = entity.mapped;
} else {
target = await this.zbController.resolveEntity(deviceId, epName);
if (has_elevated_debug) this.log.warn(`ELEVATED: Resolved target: ${safeJsonStringify(target)}`);
const targetID = (target.device ? target.device.ID : '-1');
target = target.endpoint;
if (has_elevated_debug) this.log.warn(`ELEVATED: selected endpoint of resolved Target: ${safeJsonStringify(target)}`);
const epID = (target.ID ? target.ID : '-1')
const epIEEE = (target.deviceIeeeAddress ? target.deviceIeeeAddress : '0x0')
if (has_elevated_debug)
this.log.warn(`ELEVATED: Target device ${epIEEE} (ID:${targetID}), EP ${epID}`);
}

this.log.debug(`target: ${safeJsonStringify(target)}`);
Expand Down

0 comments on commit 0cca40f

Please sign in to comment.