Skip to content

Commit 3693e51

Browse files
committed
refactor: update wt201_v2
1 parent e850447 commit 3693e51

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

vendors/milesight-iot/wt-series/wt201-v2/wt201-v2-codec.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2452,6 +2452,36 @@
24522452
"bacnet_type": "binary_value_object",
24532453
"bacnet_unit_type_id": 95,
24542454
"bacnet_unit_type": "UNITS_NO_UNITS"
2455+
},
2456+
{
2457+
"id": "current_temperature_control_mode",
2458+
"name": "Temperature Control Mode",
2459+
"value": "0",
2460+
"unit": "",
2461+
"access_mode": "W",
2462+
"data_type": "ENUM",
2463+
"value_type": "UINT8",
2464+
"values": [
2465+
{
2466+
"name": "heat",
2467+
"value": 0
2468+
},
2469+
{
2470+
"name": "em heat",
2471+
"value": 1
2472+
},
2473+
{
2474+
"name": "cool",
2475+
"value": 2
2476+
},
2477+
{
2478+
"name": "auto",
2479+
"value": 3
2480+
}
2481+
],
2482+
"bacnet_type": "multistate_value_object",
2483+
"bacnet_unit_type_id": 95,
2484+
"bacnet_unit_type": "UNITS_NO_UNITS"
24552485
}
24562486
]
2457-
}
2487+
}

vendors/milesight-iot/wt-series/wt201-v2/wt201-v2-decoder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ function handle_downlink_response(channel_type, bytes, offset) {
441441
offset += 3;
442442
break;
443443
case 0xfb:
444-
decoded.temperature_control_mode = readTemperatureControlMode(readUInt8(bytes[offset]));
444+
decoded.current_temperature_control_mode = readTemperatureControlMode(readUInt8(bytes[offset]));
445445
offset += 1;
446446
break;
447447
default:

vendors/milesight-iot/wt-series/wt201-v2/wt201-v2-encoder.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ function milesightDeviceEncode(payload) {
6565
encoded = encoded.concat(setTemperatureControlMode(payload.temperature_control_mode));
6666
}
6767
}
68+
if ('current_temperature_control_mode' in payload) {
69+
encoded = encoded.concat(setTemperatureControlMode(payload.current_temperature_control_mode));
70+
}
6871
if ("system_status" in payload) {
6972
encoded = encoded.concat(setSystemStatus(payload.system_status));
7073
}

0 commit comments

Comments
 (0)