Skip to content

Commit

Permalink
Update gen2-helper.js
Browse files Browse the repository at this point in the history
Fix:
AssertionError: common.unit for role "level.brightness" must have unit - shellyplusrgbwpm (RGB0.Brightness): expected undefined to be one of [ '%' ]
  • Loading branch information
Paradoxa authored Sep 12, 2024
1 parent ea3ac12 commit bbbc621
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/devices/gen2-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2831,11 +2831,12 @@ function addRGB(deviceObj, rgbId) {
'zh-cn': '亮度',
},
type: 'number',
role: 'level.brightness',
role: 'value.brightness',
read: true,
write: true,
min: 0,
max: 100,
unit: '%',
},
};

Expand Down Expand Up @@ -2998,11 +2999,12 @@ function addRGBW(deviceObj, rgbwId) {
'zh-cn': '亮度',
},
type: 'number',
role: 'level.brightness',
role: 'value.brightness',
read: true,
write: true,
min: 0,
max: 100,
unit: '%',
},
};

Expand Down

0 comments on commit bbbc621

Please sign in to comment.