Skip to content

Commit abc348f

Browse files
authored
Only Zigbee can't have min/max for attributes larger than 2 bytes (#1546)
* bug fix, only zigbee attributes cannot have min max larger than 2 bytes * pr review changes * change back to zigbee and change the check to a db enum
1 parent 7dd15ec commit abc348f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src-electron/generator/helper-endpointconfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,10 @@ function endpoint_attribute_min_max_list(options) {
594594
if (order == null || order.length == 0) {
595595
order = 'def,min,max'
596596
}
597-
598597
let ret = '{ \\\n'
598+
const category = options.data?.root?.global?.genTemplatePackage?.category
599599
this.minMaxList.forEach((mm, index) => {
600-
if (mm.typeSize > 2) {
600+
if (mm.typeSize > 2 && category === dbEnum.helperCategory.zigbee) {
601601
throw new Error(
602602
`Can't have min/max for attributes larger than 2 bytes like '${mm.name}'`
603603
)

0 commit comments

Comments
 (0)