@@ -21,6 +21,9 @@ def zwTHERMOSTAT_MODE_VERSION 0x4001
2121def zwTHERMOSTAT_MODE 0x4002
2222def zwTHERMOSTAT_SUPPORTED_MODES 0x4003
2323
24+ //Thermostat Operating State CC
25+ def zwTHERMOSTAT_OPERATING_STATE_MODE 0x4202
26+
2427// Thermostat Cluster
2528def zb_LocalTemperature 0x02010000
2629def zb_HVACSystemTypeConfiguration 0x02010009
@@ -40,6 +43,7 @@ def zb_SystemMode 0x0201001c
4043def zb_TemperatureSetpointHold 0x02010023
4144def zb_TemperatureSetpointHoldDuration 0x02010024
4245def zb_ThermostatProgrammingOperationMode 0x02010025
46+ def zb_ThermostatRunningState 0x02010029
4347def zb_OccupiedSetback 0x02010034
4448def zb_OccupiedSetbackMin 0x02010035
4549def zb_OccupiedSetbackMax 0x02010036
@@ -54,7 +58,11 @@ def zb_ACLouverPosition 0x02010045
5458def zb_ACCoilTemperature 0x02010046
5559def zb_ACCapacityFormat 0x02010047
5660
61+ // Unify thermostat cluster
62+ def zb_OperatingState 0xfd150003
63+
5764def thermostat_setpoint_supported (e'zwTHERMOSTAT_SETPOINT_TYPE[2].zwTHERMOSTAT_SETPOINT_VALUE_SCALE | e'zwTHERMOSTAT_SETPOINT_TYPE[1].zwTHERMOSTAT_SETPOINT_VALUE_SCALE)
65+ def no_thermostat_operating_state (e'zwTHERMOSTAT_OPERATING_STATE_MODE == 0)
5866
5967scope 0 {
6068 // We map Setpoint setpoint_type 0x01 (HEATING) and 0x02 (COOLING)
@@ -252,4 +260,24 @@ scope 0 chain_reaction(0) {
252260 d'zb_ACCapacityFormat =
253261 if (r'zb_ACCapacityFormat != d'zb_ACCapacityFormat) r'zb_ACCapacityFormat
254262 undefined
263+
264+ // Thermostat Operating State
265+ // UCL bindings
266+ r'zb_ThermostatRunningState =
267+ if (no_thermostat_operating_state) undefined
268+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x00) 0x00
269+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x01) 0x01
270+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x02) 0x02
271+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x03) 0x04
272+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x08) 0x08
273+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x09) 0x10
274+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x0A) 0x20
275+ if (r'zwTHERMOSTAT_OPERATING_STATE_MODE == 0x0B) 0x40
276+ undefined // Default state
277+
278+ // Custom cluster binding
279+ r'zb_OperatingState = r'zwTHERMOSTAT_OPERATING_STATE_MODE
280+ r'zwTHERMOSTAT_OPERATING_STATE_MODE = r'zb_OperatingState
281+
282+
255283}
0 commit comments