On zigbee2mqtt startup my "ZNCZ02LM - Xiaomi Mi power plug ZigBee" caused:
Jul 26 15:50:48 orange node[8109]: (node:8109) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
Jul 26 15:50:48 orange node[8109]: at Function.entries (<anonymous>)
Jul 26 15:50:48 orange node[8109]: at Controller.iteratePayloadAttributeOutput (/myhome/service/zigbee2mqtt/node_modules/zigbee2mqtt/lib/controller.js:335:43)
Jul 26 15:50:48 orange node[8109]: at Controller.iteratePayloadAttributeOutput (/myhome/service/zigbee2mqtt/node_modules/zigbee2mqtt/lib/controller.js:348:29)
Jul 26 15:50:48 orange node[8109]: at processTicksAndRejections (internal/process/task_queues.js:93:5)
Jul 26 15:50:48 orange node[8109]: at async Controller.publishEntityState (/myhome/service/zigbee2mqtt/node_modules/zigbee2mqtt/lib/controller.js:325:21)
Jul 26 15:50:48 orange node[8109]: (Use `node --trace-warnings ...` to show where the warning was created)
Jul 26 15:50:48 orange node[8109]: (node:8109) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
Jul 26 15:50:48 orange node[8109]: (node:8109) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
If it does matter the device voltage attribute is null.
Bug Report
What happened
On zigbee2mqtt startup my
"ZNCZ02LM - Xiaomi Mi power plug ZigBee"
caused:If it does matter the device
voltage
attribute isnull
.What did you expect to happen
Skip such payload plus (optional?) warning.
How to reproduce it (minimal and precise)
The bug is here --
null
still is an object.Debug Info
Zigbee2mqtt version: Adapter hardware: CC2531, CC2530, CC26X2R1 or CC1352P-2 Adapter firmware version: