Skip to content

Commit f943fce

Browse files
authored
Merge pull request #202 from athombv/feature/onoff-startuponoff-attribute
Add StartUpOnOff and GlobalSceneControl attributes to On/Off cluster
2 parents c594053 + 7c152cd commit f943fce

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎index.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ declare module "zigbee-clusters" {
226226
}
227227
type OnOffClusterAttributes = {
228228
onOff: { id: 0x00, type: ZCLDataType<boolean> },
229+
globalSceneControl: { id: 0x4000, type: ZCLDataType<boolean> },
229230
onTime: { id: 0x4001, type: ZCLDataType<number> },
230231
offWaitTime: { id: 0x4002, type: ZCLDataType<number> },
232+
startUpOnOff: { id: 0x4003, type: ZCLDataType<"off" | "on" | "toggle" | "previous"> },
231233
};
232234
type OnOffClusterCommands = {
233235
setOff: { id: 0x00, direction: "DIRECTION_SERVER_TO_CLIENT" },

‎lib/clusters/onOff.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@ const { ZCLDataTypes } = require('../zclTypes');
55

66
const ATTRIBUTES = {
77
onOff: { id: 0, type: ZCLDataTypes.bool },
8+
globalSceneControl: { id: 16384, type: ZCLDataTypes.bool },
89
onTime: { id: 16385, type: ZCLDataTypes.uint16 },
910
offWaitTime: { id: 16386, type: ZCLDataTypes.uint16 },
11+
startUpOnOff: {
12+
id: 16387,
13+
type: ZCLDataTypes.enum8({
14+
off: 0,
15+
on: 1,
16+
toggle: 2,
17+
previous: 255,
18+
}),
19+
},
1020
};
1121

1222
const COMMANDS = {

0 commit comments

Comments
 (0)