Skip to content

Commit 8894142

Browse files
chris-1243Koenkk
andauthored
feat(add): SR-ZG9101CS (#9080)
Co-authored-by: Koen Kanters <[email protected]>
1 parent 2e048d0 commit 8894142

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/devices/sunricher.ts

+7
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,13 @@ export const definitions: DefinitionWithExtend[] = [
11091109
description: "Constant Current Zigbee LED dimmable driver",
11101110
extend: [m.light()],
11111111
},
1112+
{
1113+
fingerprint: [{modelID: "HK-ZD-DIM-A", softwareBuildID: "2.9.2_r72"}],
1114+
model: "SR-ZG9101CS",
1115+
vendor: "Sunricher",
1116+
description: "Constant Current Zigbee LED dimmable driver",
1117+
extend: [m.light({configureReporting: true})],
1118+
},
11121119
{
11131120
zigbeeModel: ["HK-DIM"],
11141121
model: "50208702",

src/lib/modernExtend.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ export function light(args?: LightArgs): ModernExtend {
10881088
if (args.configureReporting) {
10891089
await setupAttributes(device, coordinatorEndpoint, "genOnOff", [{attribute: "onOff", min: "MIN", max: "MAX", change: 1}]);
10901090
await setupAttributes(device, coordinatorEndpoint, "genLevelCtrl", [
1091-
{attribute: "currentLevel", min: "10_SECONDS", max: "MAX", change: 1, ...(args.levelReportingConfig || {})},
1091+
{attribute: "currentLevel", min: "5_SECONDS", max: "MAX", change: 1, ...(args.levelReportingConfig || {})},
10921092
]);
10931093
if (args.colorTemp) {
10941094
await setupAttributes(device, coordinatorEndpoint, "lightingColorCtrl", [

test/modernExtend.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -352,15 +352,15 @@ describe("ModernExtend", () => {
352352
configureReporting: {
353353
10: [
354354
["genOnOff", [reportingItem("onOff", 0, repInterval.MAX, 1)]],
355-
["genLevelCtrl", [reportingItem("currentLevel", 10, 65000, 1)]],
355+
["genLevelCtrl", [reportingItem("currentLevel", 5, 65000, 1)]],
356356
],
357357
11: [
358358
["genOnOff", [reportingItem("onOff", 0, repInterval.MAX, 1)]],
359-
["genLevelCtrl", [reportingItem("currentLevel", 10, 65000, 1)]],
359+
["genLevelCtrl", [reportingItem("currentLevel", 5, 65000, 1)]],
360360
],
361361
25: [
362362
["genOnOff", [reportingItem("onOff", 0, repInterval.MAX, 1)]],
363-
["genLevelCtrl", [reportingItem("currentLevel", 10, 65000, 1)]],
363+
["genLevelCtrl", [reportingItem("currentLevel", 5, 65000, 1)]],
364364
],
365365
},
366366
endpoints: {l1: 10, l2: 11, s1: 25},

0 commit comments

Comments
 (0)