From 8a69f2e291a120e656e80d34ac797d6ac551e0e8 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Fri, 26 Jun 2026 11:42:44 +0200 Subject: [PATCH 1/3] Add missing manufacturerId to CommandDefinition --- index.d.ts | 1 + scripts/template.d.ts.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/index.d.ts b/index.d.ts index b52adc7..028af5f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3239,6 +3239,7 @@ declare module "zigbee-clusters" { type CommandDefinition = { id: number, + manufacturerId?: number, direction?: CommandDirection, args?: { [argName: string]: ZCLDataType, diff --git a/scripts/template.d.ts.txt b/scripts/template.d.ts.txt index 0ac980f..c3937d9 100644 --- a/scripts/template.d.ts.txt +++ b/scripts/template.d.ts.txt @@ -565,6 +565,7 @@ declare module 'zigbee-clusters' { type CommandDefinition = { id: number, + manufacturerId?: number, direction?: CommandDirection, args?: { [argName: string]: ZCLDataType, From 8e452d324e1bf3b0530d8f60a3bd4b223afc69c5 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Fri, 26 Jun 2026 11:53:00 +0200 Subject: [PATCH 2/3] Add missing runningMode attribute definition for thermostat cluster --- index.d.ts | 1 + lib/clusters/thermostat.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/index.d.ts b/index.d.ts index b52adc7..76a2f37 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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> }, + runningMode: { id: 0x1e, type: ZCLDataType<"off" | "cool" | "heat"> }, }; type ThermostatClusterCommands = { setSetpoint: { id: 0x00, direction: "DIRECTION_SERVER_TO_CLIENT", args: { diff --git a/lib/clusters/thermostat.js b/lib/clusters/thermostat.js index af6cf95..e8d73ce 100644 --- a/lib/clusters/thermostat.js +++ b/lib/clusters/thermostat.js @@ -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 = { From 75db45323b22c5499187725fe3bfeed296122cff Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Fri, 26 Jun 2026 12:09:50 +0200 Subject: [PATCH 3/3] Add Thermostat User Interface Configuration Cluster definition --- index.d.ts | 15 +++++ lib/clusters/index.js | 3 + .../thermostatUserInterfaceConfiguration.js | 58 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 lib/clusters/thermostatUserInterfaceConfiguration.js diff --git a/index.d.ts b/index.d.ts index b52adc7..9f3cc7b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1816,6 +1816,14 @@ declare module "zigbee-clusters" { type DehumidificationControlClusterCommands = Record; class DehumidificationControlCluster extends Cluster { } + 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; + class ThermostatUserInterfaceConfigurationCluster extends Cluster { + } type ColorControlClusterAttributes = { currentHue: { id: 0x00, type: ZCLDataType }, currentSaturation: { id: 0x01, type: ZCLDataType }, @@ -2517,6 +2525,12 @@ declare module "zigbee-clusters" { ATTRIBUTES: Readonly, COMMANDS: Readonly, }, + THERMOSTAT_UI_CONFIGURATION: { + ID: 0x0204, + NAME: "thermostatUserInterfaceConfiguration", + ATTRIBUTES: Readonly, + COMMANDS: Readonly, + }, PUMP_CONFIGURATION_AND_CONTROL: { ID: 0x0200, NAME: "pumpConfigurationAndControl", @@ -2654,6 +2668,7 @@ declare module "zigbee-clusters" { "doorLock"?: DoorLockCluster; "windowCovering"?: WindowCoveringCluster; "thermostat"?: ThermostatCluster; + "thermostatUserInterfaceConfiguration"?: ThermostatUserInterfaceConfigurationCluster; "pumpConfigurationAndControl"?: PumpConfigurationAndControlCluster; "fanControl"?: FanControlCluster; "colorControl"?: ColorControlCluster; diff --git a/lib/clusters/index.js b/lib/clusters/index.js index ec314e3..cf5718b 100644 --- a/lib/clusters/index.js +++ b/lib/clusters/index.js @@ -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'); @@ -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 @@ -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), diff --git a/lib/clusters/thermostatUserInterfaceConfiguration.js b/lib/clusters/thermostatUserInterfaceConfiguration.js new file mode 100644 index 0000000..09531e3 --- /dev/null +++ b/lib/clusters/thermostatUserInterfaceConfiguration.js @@ -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;