Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1782,6 +1782,7 @@ declare module "zigbee-clusters" {
controlSequenceOfOperation: { id: 0x1b, type: ZCLDataType<"cooling" | "coolingWithReheat" | "heating" | "heatingWithReheat" | "coolingAndHeating4Pipes" | "coolingAndHeating4PipesWithReheat"> },
systemMode: { id: 0x1c, type: ZCLDataType<"off" | "auto" | "cool" | "heat" | "emergencyHeating" | "precooling" | "fanOnly" | "dry" | "sleep"> },
alarmMask: { id: 0x1d, type: ZCLDataType<Bitmap<"initializationFailure" | "hardwareFailure" | "selfCalibrationFailure">> },
runningMode: { id: 0x1e, type: ZCLDataType<"off" | "cool" | "heat"> },
};
type ThermostatClusterCommands = {
setSetpoint: { id: 0x00, direction: "DIRECTION_SERVER_TO_CLIENT", args: {
Expand Down Expand Up @@ -1816,6 +1817,14 @@ declare module "zigbee-clusters" {
type DehumidificationControlClusterCommands = Record<never, never>;
class DehumidificationControlCluster<Attributes extends types.AttributeDefinitions = DehumidificationControlClusterAttributes, Commands extends types.CommandDefinitions = DehumidificationControlClusterCommands> extends Cluster<Attributes, Commands> {
}
type ThermostatUserInterfaceConfigurationClusterAttributes = {
temperatureDisplayMode: { id: 0x00, type: ZCLDataType<"celsius" | "fahrenheit"> },
keypadLockout: { id: 0x01, type: ZCLDataType<"none" | "level1" | "level2" | "level3" | "level4" | "level5"> },
scheduleProgrammingVisibility: { id: 0x02, type: ZCLDataType<"enabled" | "disabled"> },
};
type ThermostatUserInterfaceConfigurationClusterCommands = Record<never, never>;
class ThermostatUserInterfaceConfigurationCluster<Attributes extends types.AttributeDefinitions = ThermostatUserInterfaceConfigurationClusterAttributes, Commands extends types.CommandDefinitions = ThermostatUserInterfaceConfigurationClusterCommands> extends Cluster<Attributes, Commands> {
}
type ColorControlClusterAttributes = {
currentHue: { id: 0x00, type: ZCLDataType<number> },
currentSaturation: { id: 0x01, type: ZCLDataType<number> },
Expand Down Expand Up @@ -2517,6 +2526,12 @@ declare module "zigbee-clusters" {
ATTRIBUTES: Readonly<ThermostatClusterAttributes>,
COMMANDS: Readonly<ThermostatClusterCommands>,
},
THERMOSTAT_UI_CONFIGURATION: {
ID: 0x0204,
NAME: "thermostatUserInterfaceConfiguration",
ATTRIBUTES: Readonly<ThermostatUserInterfaceConfigurationClusterAttributes>,
COMMANDS: Readonly<ThermostatUserInterfaceConfigurationClusterCommands>,
},
PUMP_CONFIGURATION_AND_CONTROL: {
ID: 0x0200,
NAME: "pumpConfigurationAndControl",
Expand Down Expand Up @@ -2654,6 +2669,7 @@ declare module "zigbee-clusters" {
"doorLock"?: DoorLockCluster;
"windowCovering"?: WindowCoveringCluster;
"thermostat"?: ThermostatCluster;
"thermostatUserInterfaceConfiguration"?: ThermostatUserInterfaceConfigurationCluster;
"pumpConfigurationAndControl"?: PumpConfigurationAndControlCluster;
"fanControl"?: FanControlCluster;
"colorControl"?: ColorControlCluster;
Expand Down Expand Up @@ -3239,6 +3255,7 @@ declare module "zigbee-clusters" {

type CommandDefinition = {
id: number,
manufacturerId?: number,
direction?: CommandDirection,
args?: {
[argName: string]: ZCLDataType<any>,
Expand Down
3 changes: 3 additions & 0 deletions lib/clusters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const ThermostatCluster = require('./thermostat');
const PumpConfigurationAndControlCluster = require('./pumpConfigurationAndControl');
const FanControlCluster = require('./fanControl');
const DehumidificationControlCluster = require('./dehumidificationControl');
const ThermostatUserInterfaceConfigurationCluster = require('./thermostatUserInterfaceConfiguration');
const ColorControlCluster = require('./colorControl');
const BallastConfigurationCluster = require('./ballastConfiguration');
const IlluminanceMeasurementCluster = require('./illuminanceMeasurement');
Expand Down Expand Up @@ -95,6 +96,7 @@ module.exports = {
PumpConfigurationAndControlCluster, // 0x0200 => 512
FanControlCluster, // 0x0202 => 514
DehumidificationControlCluster, // 0x0203 => 515
ThermostatUserInterfaceConfigurationCluster, // 0x0204 => 516
ColorControlCluster, // 0x0300 => 768
BallastConfigurationCluster, // 0x0301 => 769
IlluminanceMeasurementCluster, // 0x0400 => 1024
Expand Down Expand Up @@ -139,6 +141,7 @@ module.exports = {
DOOR_LOCK: destructConstProps(DoorLockCluster),
WINDOW_COVERING: destructConstProps(WindowCoveringCluster),
THERMOSTAT: destructConstProps(ThermostatCluster),
THERMOSTAT_UI_CONFIGURATION: destructConstProps(ThermostatUserInterfaceConfigurationCluster),
PUMP_CONFIGURATION_AND_CONTROL: destructConstProps(PumpConfigurationAndControlCluster),
FAN_CONTROL: destructConstProps(FanControlCluster),
COLOR_CONTROL: destructConstProps(ColorControlCluster),
Expand Down
8 changes: 8 additions & 0 deletions lib/clusters/thermostat.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ const ATTRIBUTES = {
}),
},
alarmMask: { id: 29, type: ZCLDataTypes.map8('initializationFailure', 'hardwareFailure', 'selfCalibrationFailure') },
runningMode: {
id: 30,
type: ZCLDataTypes.enum8({
off: 0,
cool: 3,
heat: 4,
}),
},
};

const COMMANDS = {
Expand Down
58 changes: 58 additions & 0 deletions lib/clusters/thermostatUserInterfaceConfiguration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
'use strict';

const Cluster = require('../Cluster');
const { ZCLDataTypes } = require('../zclTypes');

const ATTRIBUTES = {
temperatureDisplayMode: {
id: 0,
type: ZCLDataTypes.enum8({
celsius: 0,
fahrenheit: 1,
}),
},
keypadLockout: {
id: 1,
type: ZCLDataTypes.enum8({
none: 0,
level1: 1,
level2: 2,
level3: 3,
level4: 4,
level5: 5,
}),
},
scheduleProgrammingVisibility: {
id: 2,
type: ZCLDataTypes.enum8({
enabled: 0,
disabled: 1,
}),
},
};

const COMMANDS = {};

class ThermostatUserInterfaceConfigurationCluster extends Cluster {

static get ID() {
return 516;
}

static get NAME() {
return 'thermostatUserInterfaceConfiguration';
}

static get ATTRIBUTES() {
return ATTRIBUTES;
}

static get COMMANDS() {
return COMMANDS;
}

}

Cluster.addCluster(ThermostatUserInterfaceConfigurationCluster);

module.exports = ThermostatUserInterfaceConfigurationCluster;
1 change: 1 addition & 0 deletions scripts/template.d.ts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ declare module 'zigbee-clusters' {

type CommandDefinition = {
id: number,
manufacturerId?: number,
direction?: CommandDirection,
args?: {
[argName: string]: ZCLDataType<any>,
Expand Down
Loading