From 4c973772630bfa999799f595dc157caf0b7ad790 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sun, 20 Oct 2019 20:52:44 +0200 Subject: [PATCH] Fix Revert key as shortaddr for ZigbeeReveived --- sonoff/xdrv_23_zigbee_8_parsers.ino | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sonoff/xdrv_23_zigbee_8_parsers.ino b/sonoff/xdrv_23_zigbee_8_parsers.ino index 495ce61ab..286596e33 100644 --- a/sonoff/xdrv_23_zigbee_8_parsers.ino +++ b/sonoff/xdrv_23_zigbee_8_parsers.ino @@ -385,8 +385,9 @@ int32_t Z_ReceiveAfIncomingMessage(int32_t res, const class SBuffer &buf) { DynamicJsonBuffer jsonBuffer; JsonObject& json_root = jsonBuffer.createObject(); - JsonObject& json = json_root.createNestedObject(F(D_CMND_ZIGBEE_RECEIVED)); - json[F(D_JSON_ZIGBEE_DEVICE)] = shortaddr; + JsonObject& json1 = json_root.createNestedObject(F(D_CMND_ZIGBEE_RECEIVED)); + JsonObject& json = json1.createNestedObject(shortaddr); + // TODO add name field if it is known if ( (!zcl_received.isClusterSpecificCommand()) && (ZCL_REPORT_ATTRIBUTES == zcl_received.getCmdId())) { zcl_received.parseRawAttributes(json);