Skip to content

Commit 3a56fe2

Browse files
committed
GH-33: Fan Control UAM file
Forwarded: #33 Bug-SiliconLabs: UIC-3042 Bug-Github: #33
1 parent 518d63c commit 3a56fe2

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
def zwTHERMOSTAT_FAN_MODE_CURRENT_FAN_MODE 0x4402
2+
def zwTHERMOSTAT_FAN_MODE_SUPPORTED_FAN_MODE 0x4403
3+
4+
def zwTHERMOSTAT_FAN_STATE 0x4502
5+
def zwTHERMOSTAT_FAN_OFF_FLAG 0x4504
6+
7+
def zbZWAVE_FAN_MODE 0xFD140001
8+
def zbZWAVE_SUPPORTED_FAN_MODE 0xFD140002
9+
def zbZWAVE_FAN_STATE 0xFD140003
10+
11+
def zbFAN_MODE 0x02020000
12+
13+
def zwave_no_thermostat_fan_mode (e'zwTHERMOSTAT_FAN_MODE_CURRENT_FAN_MODE == 0)
14+
15+
// Unify Fan mode (ZWave) <-> FanMode cluster
16+
scope 20 chain_reaction(0) {
17+
r'zbZWAVE_FAN_MODE =
18+
if (zwave_no_thermostat_fan_mode) undefined
19+
if (r'zbFAN_MODE == 5) 0
20+
if (r'zbFAN_MODE == 1) 1
21+
if (r'zbFAN_MODE == 2) 5
22+
undefined
23+
d'zbZWAVE_FAN_MODE =
24+
if (zwave_no_thermostat_fan_mode) undefined
25+
if (d'zbFAN_MODE == 5) 0
26+
if (d'zbFAN_MODE == 1) 1
27+
if (d'zbFAN_MODE == 2) 5
28+
undefined
29+
30+
r'zwTHERMOSTAT_FAN_OFF_FLAG =
31+
if (zwave_no_thermostat_fan_mode) undefined
32+
if (r'zbFAN_MODE == 0) 1
33+
0
34+
d'zwTHERMOSTAT_FAN_OFF_FLAG =
35+
if (zwave_no_thermostat_fan_mode) undefined
36+
if (d'zbFAN_MODE == 0) 1
37+
0
38+
39+
// Linking attributes zigbee -> zwave
40+
r'zbFAN_MODE =
41+
if (zwave_no_thermostat_fan_mode) undefined
42+
if (r'zbZWAVE_FAN_MODE == 0) 5
43+
if (r'zbZWAVE_FAN_MODE == 1) 1
44+
if (r'zbZWAVE_FAN_MODE == 2) 3
45+
if (r'zbZWAVE_FAN_MODE == 3) 3
46+
if (r'zbZWAVE_FAN_MODE == 4) 2
47+
if (r'zbZWAVE_FAN_MODE == 5) 2
48+
if (r'zwTHERMOSTAT_FAN_OFF_FLAG == 1) 4
49+
if (r'zwTHERMOSTAT_FAN_OFF_FLAG == 0) 0
50+
undefined
51+
52+
// Linking attributes zigbee -> zwave
53+
d'zbFAN_MODE =
54+
if (zwave_no_thermostat_fan_mode) undefined
55+
if (d'zbZWAVE_FAN_MODE == 0) 5
56+
if (d'zbZWAVE_FAN_MODE == 1) 1
57+
if (d'zbZWAVE_FAN_MODE == 2) 3
58+
if (d'zbZWAVE_FAN_MODE == 3) 3
59+
if (d'zbZWAVE_FAN_MODE == 4) 2
60+
if (d'zbZWAVE_FAN_MODE == 5) 2
61+
if (d'zwTHERMOSTAT_FAN_OFF_FLAG == 1) 4
62+
if (d'zwTHERMOSTAT_FAN_OFF_FLAG == 0) 0
63+
undefined
64+
}
65+
66+
// Unify Fan mode (ZWave) <-> Attribute Store
67+
scope 25 chain_reaction(0) {
68+
// Linking attributes zwave -> zigbee
69+
r'zbZWAVE_FAN_MODE =
70+
if (zwave_no_thermostat_fan_mode) undefined
71+
r'zwTHERMOSTAT_FAN_MODE_CURRENT_FAN_MODE
72+
d'zbZWAVE_FAN_MODE =
73+
if (zwave_no_thermostat_fan_mode) undefined
74+
d'zwTHERMOSTAT_FAN_MODE_CURRENT_FAN_MODE
75+
76+
77+
// Linking attributes zigbee -> zwave
78+
r'zwTHERMOSTAT_FAN_MODE_CURRENT_FAN_MODE =
79+
if (zwave_no_thermostat_fan_mode) undefined
80+
r'zbZWAVE_FAN_MODE
81+
d'zwTHERMOSTAT_FAN_MODE_CURRENT_FAN_MODE =
82+
if (zwave_no_thermostat_fan_mode) undefined
83+
d'zbZWAVE_FAN_MODE
84+
85+
// Supported fan mode (read only)
86+
r'zbZWAVE_SUPPORTED_FAN_MODE =
87+
if (zwave_no_thermostat_fan_mode) undefined
88+
r'zwTHERMOSTAT_FAN_MODE_SUPPORTED_FAN_MODE
89+
90+
// Supported state(read only)
91+
r'zbZWAVE_FAN_STATE =
92+
if (zwave_no_thermostat_fan_mode) undefined
93+
r'zwTHERMOSTAT_FAN_STATE
94+
}

0 commit comments

Comments
 (0)