@@ -54,6 +54,10 @@ def zb_ACLouverPosition                     0x02010045
5454def zb_ACCoilTemperature                    0x02010046
5555def zb_ACCapacityFormat                     0x02010047
5656
57+ // Unify thermostat cluster
58+ def zb_ZWaveSystemMode     0xfd150001
59+ def zb_SupportedSystemMode 0xfd150002
60+ 
5761def thermostat_setpoint_supported (e'zwTHERMOSTAT_SETPOINT_TYPE[2].zwTHERMOSTAT_SETPOINT_VALUE_SCALE | e'zwTHERMOSTAT_SETPOINT_TYPE[1].zwTHERMOSTAT_SETPOINT_VALUE_SCALE)
5862
5963scope 0 {
@@ -131,23 +135,48 @@ scope 0 {
131135
132136
133137  r'zb_SystemMode =
134-     if (r'zwTHERMOSTAT_MODE == 0) 0
135-     if (r'zwTHERMOSTAT_MODE == 1) 4
136-     if (r'zwTHERMOSTAT_MODE == 2) 3
137-     if (r'zwTHERMOSTAT_MODE == 3) 1
138-     if (r'zwTHERMOSTAT_MODE == 6) 7
139-     if (r'zwTHERMOSTAT_MODE == 8) 8
138+     if (r'zwTHERMOSTAT_MODE == 0x00) 0x00
139+     if (r'zwTHERMOSTAT_MODE == 0x01) 0x04
140+     if (r'zwTHERMOSTAT_MODE == 0x02) 0x03
141+     if (r'zwTHERMOSTAT_MODE == 0x03) 0x01
142+     if (r'zwTHERMOSTAT_MODE == 0x04) 0x0A
143+     if (r'zwTHERMOSTAT_MODE == 0x05) 0x0B
144+     if (r'zwTHERMOSTAT_MODE == 0x06) 0x07 
145+     if (r'zwTHERMOSTAT_MODE == 0x07) 0x0C
146+     if (r'zwTHERMOSTAT_MODE == 0x08) 0x08
147+     if (r'zwTHERMOSTAT_MODE == 0x09) 0x0D
148+     if (r'zwTHERMOSTAT_MODE == 0x0A) 0x0E
149+     if (r'zwTHERMOSTAT_MODE == 0x0B) 0x0F
150+     if (r'zwTHERMOSTAT_MODE == 0x0C) 0x10
151+     if (r'zwTHERMOSTAT_MODE == 0x0D) 0x11
152+     if (r'zwTHERMOSTAT_MODE == 0x0F) 0x12
153+     if (r'zwTHERMOSTAT_MODE == 0x1F) 0x13
140154    undefined
141155
142-   d'zwTHERMOSTAT_MODE =
143-     if ( d'zb_SystemMode == 0) 0
144-     if ( d'zb_SystemMode == 4) 1
145-     if ( d'zb_SystemMode == 3) 2
146-     if ( d'zb_SystemMode == 1) 3
147-     if ( d'zb_SystemMode == 7) 6
148-     if ( d'zb_SystemMode == 8) 8
156+   r'zwTHERMOSTAT_MODE = 
157+     if (r'zb_SystemMode == 0x00) 0x00
158+     if (r'zb_SystemMode == 0x04) 0x01
159+     if (r'zb_SystemMode == 0x03) 0x02
160+     if (r'zb_SystemMode == 0x01) 0x03
161+     if (r'zb_SystemMode == 0x0A) 0x04
162+     if (r'zb_SystemMode == 0x0B) 0x05
163+     if (r'zb_SystemMode == 0x07) 0x06
164+     if (r'zb_SystemMode == 0x0C) 0x07
165+     if (r'zb_SystemMode == 0x08) 0x08
166+     if (r'zb_SystemMode == 0x0D) 0x09
167+     if (r'zb_SystemMode == 0x0E) 0x0A
168+     if (r'zb_SystemMode == 0x0F) 0x0B
169+     if (r'zb_SystemMode == 0x10) 0x0C
170+     if (r'zb_SystemMode == 0x11) 0x0D
171+     if (r'zb_SystemMode == 0x12) 0x0F
172+     if (r'zb_SystemMode == 0x13) 0x1F
149173    undefined
150174
175+   // Unify cluster is 1on 1 mapping
176+   r'zb_ZWaveSystemMode = r'zwTHERMOSTAT_MODE
177+   r'zwTHERMOSTAT_MODE = r'zb_ZWaveSystemMode
178+ 
179+   
151180  r'zb_ControlSequenceOfOperation =
152181    if(((r'zwTHERMOSTAT_SUPPORTED_MODES) & 6) == 0x06) 0x04
153182    if(((r'zwTHERMOSTAT_SUPPORTED_MODES) & 6) == 0x02) 0x02
@@ -252,4 +281,7 @@ scope 0 chain_reaction(0) {
252281  d'zb_ACCapacityFormat =
253282    if (r'zb_ACCapacityFormat != d'zb_ACCapacityFormat) r'zb_ACCapacityFormat
254283    undefined
284+ 
285+ 
286+   r'zb_SupportedSystemMode = r'zwTHERMOSTAT_SUPPORTED_MODES
255287}
0 commit comments