Skip to content

Commit 0eeb4e9

Browse files
authored
Merge pull request #199 from athombv/master
Merge master into production (#minor)
2 parents cecd56b + 43bc7e6 commit 0eeb4e9

5 files changed

Lines changed: 87 additions & 0 deletions

File tree

index.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,7 @@ declare module "zigbee-clusters" {
17821782
controlSequenceOfOperation: { id: 0x1b, type: ZCLDataType<"cooling" | "coolingWithReheat" | "heating" | "heatingWithReheat" | "coolingAndHeating4Pipes" | "coolingAndHeating4PipesWithReheat"> },
17831783
systemMode: { id: 0x1c, type: ZCLDataType<"off" | "auto" | "cool" | "heat" | "emergencyHeating" | "precooling" | "fanOnly" | "dry" | "sleep"> },
17841784
alarmMask: { id: 0x1d, type: ZCLDataType<Bitmap<"initializationFailure" | "hardwareFailure" | "selfCalibrationFailure">> },
1785+
runningMode: { id: 0x1e, type: ZCLDataType<"off" | "cool" | "heat"> },
17851786
};
17861787
type ThermostatClusterCommands = {
17871788
setSetpoint: { id: 0x00, direction: "DIRECTION_SERVER_TO_CLIENT", args: {
@@ -1816,6 +1817,14 @@ declare module "zigbee-clusters" {
18161817
type DehumidificationControlClusterCommands = Record<never, never>;
18171818
class DehumidificationControlCluster<Attributes extends types.AttributeDefinitions = DehumidificationControlClusterAttributes, Commands extends types.CommandDefinitions = DehumidificationControlClusterCommands> extends Cluster<Attributes, Commands> {
18181819
}
1820+
type ThermostatUserInterfaceConfigurationClusterAttributes = {
1821+
temperatureDisplayMode: { id: 0x00, type: ZCLDataType<"celsius" | "fahrenheit"> },
1822+
keypadLockout: { id: 0x01, type: ZCLDataType<"none" | "level1" | "level2" | "level3" | "level4" | "level5"> },
1823+
scheduleProgrammingVisibility: { id: 0x02, type: ZCLDataType<"enabled" | "disabled"> },
1824+
};
1825+
type ThermostatUserInterfaceConfigurationClusterCommands = Record<never, never>;
1826+
class ThermostatUserInterfaceConfigurationCluster<Attributes extends types.AttributeDefinitions = ThermostatUserInterfaceConfigurationClusterAttributes, Commands extends types.CommandDefinitions = ThermostatUserInterfaceConfigurationClusterCommands> extends Cluster<Attributes, Commands> {
1827+
}
18191828
type ColorControlClusterAttributes = {
18201829
currentHue: { id: 0x00, type: ZCLDataType<number> },
18211830
currentSaturation: { id: 0x01, type: ZCLDataType<number> },
@@ -2517,6 +2526,12 @@ declare module "zigbee-clusters" {
25172526
ATTRIBUTES: Readonly<ThermostatClusterAttributes>,
25182527
COMMANDS: Readonly<ThermostatClusterCommands>,
25192528
},
2529+
THERMOSTAT_UI_CONFIGURATION: {
2530+
ID: 0x0204,
2531+
NAME: "thermostatUserInterfaceConfiguration",
2532+
ATTRIBUTES: Readonly<ThermostatUserInterfaceConfigurationClusterAttributes>,
2533+
COMMANDS: Readonly<ThermostatUserInterfaceConfigurationClusterCommands>,
2534+
},
25202535
PUMP_CONFIGURATION_AND_CONTROL: {
25212536
ID: 0x0200,
25222537
NAME: "pumpConfigurationAndControl",
@@ -2654,6 +2669,7 @@ declare module "zigbee-clusters" {
26542669
"doorLock"?: DoorLockCluster;
26552670
"windowCovering"?: WindowCoveringCluster;
26562671
"thermostat"?: ThermostatCluster;
2672+
"thermostatUserInterfaceConfiguration"?: ThermostatUserInterfaceConfigurationCluster;
26572673
"pumpConfigurationAndControl"?: PumpConfigurationAndControlCluster;
26582674
"fanControl"?: FanControlCluster;
26592675
"colorControl"?: ColorControlCluster;
@@ -3239,6 +3255,7 @@ declare module "zigbee-clusters" {
32393255

32403256
type CommandDefinition = {
32413257
id: number,
3258+
manufacturerId?: number,
32423259
direction?: CommandDirection,
32433260
args?: {
32443261
[argName: string]: ZCLDataType<any>,

lib/clusters/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const ThermostatCluster = require('./thermostat');
3030
const PumpConfigurationAndControlCluster = require('./pumpConfigurationAndControl');
3131
const FanControlCluster = require('./fanControl');
3232
const DehumidificationControlCluster = require('./dehumidificationControl');
33+
const ThermostatUserInterfaceConfigurationCluster = require('./thermostatUserInterfaceConfiguration');
3334
const ColorControlCluster = require('./colorControl');
3435
const BallastConfigurationCluster = require('./ballastConfiguration');
3536
const IlluminanceMeasurementCluster = require('./illuminanceMeasurement');
@@ -95,6 +96,7 @@ module.exports = {
9596
PumpConfigurationAndControlCluster, // 0x0200 => 512
9697
FanControlCluster, // 0x0202 => 514
9798
DehumidificationControlCluster, // 0x0203 => 515
99+
ThermostatUserInterfaceConfigurationCluster, // 0x0204 => 516
98100
ColorControlCluster, // 0x0300 => 768
99101
BallastConfigurationCluster, // 0x0301 => 769
100102
IlluminanceMeasurementCluster, // 0x0400 => 1024
@@ -139,6 +141,7 @@ module.exports = {
139141
DOOR_LOCK: destructConstProps(DoorLockCluster),
140142
WINDOW_COVERING: destructConstProps(WindowCoveringCluster),
141143
THERMOSTAT: destructConstProps(ThermostatCluster),
144+
THERMOSTAT_UI_CONFIGURATION: destructConstProps(ThermostatUserInterfaceConfigurationCluster),
142145
PUMP_CONFIGURATION_AND_CONTROL: destructConstProps(PumpConfigurationAndControlCluster),
143146
FAN_CONTROL: destructConstProps(FanControlCluster),
144147
COLOR_CONTROL: destructConstProps(ColorControlCluster),

lib/clusters/thermostat.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ const ATTRIBUTES = {
5050
}),
5151
},
5252
alarmMask: { id: 29, type: ZCLDataTypes.map8('initializationFailure', 'hardwareFailure', 'selfCalibrationFailure') },
53+
runningMode: {
54+
id: 30,
55+
type: ZCLDataTypes.enum8({
56+
off: 0,
57+
cool: 3,
58+
heat: 4,
59+
}),
60+
},
5361
};
5462

5563
const COMMANDS = {
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
'use strict';
2+
3+
const Cluster = require('../Cluster');
4+
const { ZCLDataTypes } = require('../zclTypes');
5+
6+
const ATTRIBUTES = {
7+
temperatureDisplayMode: {
8+
id: 0,
9+
type: ZCLDataTypes.enum8({
10+
celsius: 0,
11+
fahrenheit: 1,
12+
}),
13+
},
14+
keypadLockout: {
15+
id: 1,
16+
type: ZCLDataTypes.enum8({
17+
none: 0,
18+
level1: 1,
19+
level2: 2,
20+
level3: 3,
21+
level4: 4,
22+
level5: 5,
23+
}),
24+
},
25+
scheduleProgrammingVisibility: {
26+
id: 2,
27+
type: ZCLDataTypes.enum8({
28+
enabled: 0,
29+
disabled: 1,
30+
}),
31+
},
32+
};
33+
34+
const COMMANDS = {};
35+
36+
class ThermostatUserInterfaceConfigurationCluster extends Cluster {
37+
38+
static get ID() {
39+
return 516;
40+
}
41+
42+
static get NAME() {
43+
return 'thermostatUserInterfaceConfiguration';
44+
}
45+
46+
static get ATTRIBUTES() {
47+
return ATTRIBUTES;
48+
}
49+
50+
static get COMMANDS() {
51+
return COMMANDS;
52+
}
53+
54+
}
55+
56+
Cluster.addCluster(ThermostatUserInterfaceConfigurationCluster);
57+
58+
module.exports = ThermostatUserInterfaceConfigurationCluster;

scripts/template.d.ts.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ declare module 'zigbee-clusters' {
565565

566566
type CommandDefinition = {
567567
id: number,
568+
manufacturerId?: number,
568569
direction?: CommandDirection,
569570
args?: {
570571
[argName: string]: ZCLDataType<any>,

0 commit comments

Comments
 (0)