From 0cca40ffa6101ba892ec0a4672d9a11ee47c6b04 Mon Sep 17 00:00:00 2001 From: asgothian <45667167+asgothian@users.noreply.github.com> Date: Thu, 26 Dec 2024 11:07:20 +0100 Subject: [PATCH] bugfix --- main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index f7514106..10014af3 100644 --- a/main.js +++ b/main.js @@ -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)}`);