Skip to content

Commit 8dc1719

Browse files
authored
feat: Extend support for custom zigbee frames with zcl_command (#8867)
1 parent 54de561 commit 8dc1719

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/converters/toZigbee.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,18 @@ const converters2 = {
243243
utils.assertObject(value, key);
244244
const payload = value.payload !== undefined ? value.payload : {};
245245
utils.assertEndpoint(entity);
246-
await entity.zclCommand(value.cluster, value.command, payload, value.options !== undefined ? value.options : {});
247-
logger.info(`Invoked ZCL command ${value.cluster}.${value.command} with payload '${JSON.stringify(payload)}'`, NS);
246+
await entity.zclCommand(
247+
value.cluster,
248+
value.command,
249+
payload,
250+
value.options !== undefined ? value.options : {},
251+
value.log_payload ?? {},
252+
value.check_status ?? false,
253+
value.frametype ?? Zcl.FrameType.SPECIFIC,
254+
);
255+
if (value.logging ?? false) {
256+
logger.info(`Invoked ZCL command ${value.cluster}.${value.command} with payload '${JSON.stringify(payload)}'`, NS);
257+
}
248258
},
249259
} satisfies Tz.Converter,
250260
arm_mode: {

0 commit comments

Comments
 (0)