Skip to content

Commit 06032be

Browse files
committed
GH-31: Thermostat UAM file
1 parent 603a2c8 commit 06032be

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

applications/zpc/components/dotdot_mapper/rules/Thermostat.uam

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def zwTHERMOSTAT_MODE_VERSION 0x4001
2121
def zwTHERMOSTAT_MODE 0x4002
2222
def zwTHERMOSTAT_SUPPORTED_MODES 0x4003
2323

24+
//Thermostat Operating State CC
25+
def zwTHERMOSTAT_OPERATING_STATE_MODE 0x4202
26+
2427
// Thermostat Cluster
2528
def zb_LocalTemperature 0x02010000
2629
def zb_HVACSystemTypeConfiguration 0x02010009
@@ -40,6 +43,7 @@ def zb_SystemMode 0x0201001c
4043
def zb_TemperatureSetpointHold 0x02010023
4144
def zb_TemperatureSetpointHoldDuration 0x02010024
4245
def zb_ThermostatProgrammingOperationMode 0x02010025
46+
def zb_ThermostatRunningState 0x02010029
4347
def zb_OccupiedSetback 0x02010034
4448
def zb_OccupiedSetbackMin 0x02010035
4549
def zb_OccupiedSetbackMax 0x02010036
@@ -54,7 +58,11 @@ def zb_ACLouverPosition 0x02010045
5458
def zb_ACCoilTemperature 0x02010046
5559
def zb_ACCapacityFormat 0x02010047
5660

61+
// Unify thermostat cluster
62+
def zb_OperatingState 0xfd150003
63+
5764
def 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

5967
scope 0 {
6068
// We map Setpoint setpoint_type 0x01 (HEATING) and 0x02 (COOLING)
@@ -252,4 +260,21 @@ 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
255280
}

0 commit comments

Comments
 (0)