|
12 | 12 |
|
13 | 13 |
|
14 | 14 | @pytest.mark.parametrize(
|
15 |
| - "msg,attr,value", |
| 15 | + "manuf,msg,attr,value", |
16 | 16 | [
|
17 | 17 | (
|
| 18 | + "_TZE204_p3lqqy2r", |
18 | 19 | b"\t\x13\x02\x00\x06\x01\x01\x00\x01\x01",
|
19 | 20 | Thermostat.AttributeDefs.system_mode,
|
20 | 21 | Thermostat.SystemMode.Heat,
|
21 | 22 | ), # Set to heat, dp 1
|
22 | 23 | (
|
| 24 | + "_TZE204_p3lqqy2r", |
23 | 25 | b"\t\x16\x02\x00\t\x18\x02\x00\x04\x00\x00\x00\x18",
|
24 | 26 | Thermostat.AttributeDefs.local_temperature,
|
25 | 27 | 2400,
|
26 | 28 | ), # Current temp 24, dp 24
|
27 | 29 | (
|
| 30 | + "_TZE204_p3lqqy2r", |
28 | 31 | b"\t\x15\x02\x00\x08\x10\x02\x00\x04\x00\x00\x00\x19",
|
29 | 32 | Thermostat.AttributeDefs.occupied_heating_setpoint,
|
30 | 33 | 2500,
|
31 | 34 | ), # Setpoint to 25, dp 16
|
32 | 35 | (
|
| 36 | + "_TZE204_p3lqqy2r", |
33 | 37 | b"\t\x17\x02\x00\n\x1c\x02\x00\x04\x00\x00\x00\x00",
|
34 | 38 | Thermostat.AttributeDefs.local_temperature_calibration,
|
35 | 39 | 0,
|
36 | 40 | ), # Local calibration to 0, dp 28
|
37 | 41 | (
|
| 42 | + "_TZE204_p3lqqy2r", |
38 | 43 | b"\t\x1c\x02\x00\x0fh\x01\x00\x01\x01",
|
39 | 44 | Thermostat.AttributeDefs.running_state,
|
40 | 45 | Thermostat.RunningState.Heat_State_On,
|
41 | 46 | ), # Running state, dp 104
|
42 | 47 | (
|
| 48 | + "_TZE204_p3lqqy2r", |
43 | 49 | b"\t\x1d\x02\x00\x10k\x02\x00\x04\x00\x00\x00\x1b",
|
44 | 50 | Thermostat.AttributeDefs.max_heat_setpoint_limit,
|
45 | 51 | 2700,
|
46 | 52 | ), # Max heat set point, dp 107
|
| 53 | + ( |
| 54 | + "_TZE204_lzriup1j", |
| 55 | + b"\t\x13\x02\x00\x06\x01\x01\x00\x01\x01", |
| 56 | + Thermostat.AttributeDefs.system_mode, |
| 57 | + Thermostat.SystemMode.Heat, |
| 58 | + ), # Set to heat, dp 1 |
| 59 | + ( |
| 60 | + "_TZE200_viy9ihs7", |
| 61 | + b"\t\x13\x02\x00\x06\x01\x01\x00\x01\x01", |
| 62 | + Thermostat.AttributeDefs.system_mode, |
| 63 | + Thermostat.SystemMode.Heat, |
| 64 | + ), # Set to heat, dp 1 |
| 65 | + ( |
| 66 | + "_TZE204_xnbkhhdr", |
| 67 | + b"\t\x13\x02\x00\x06\x01\x01\x00\x01\x01", |
| 68 | + Thermostat.AttributeDefs.system_mode, |
| 69 | + Thermostat.SystemMode.Heat, |
| 70 | + ), # Set to heat, dp 1 |
| 71 | + ( |
| 72 | + "_TZE284_xnbkhhdr", |
| 73 | + b"\t\x13\x02\x00\x06\x01\x01\x00\x01\x01", |
| 74 | + Thermostat.AttributeDefs.system_mode, |
| 75 | + Thermostat.SystemMode.Heat, |
| 76 | + ), # Set to heat, dp 1 |
47 | 77 | ],
|
48 | 78 | )
|
49 |
| -async def test_handle_get_data(zigpy_device_from_v2_quirk, msg, attr, value): |
| 79 | +async def test_handle_get_data(zigpy_device_from_v2_quirk, manuf, msg, attr, value): |
50 | 80 | """Test handle_get_data for multiple attributes."""
|
51 | 81 |
|
52 |
| - quirked = zigpy_device_from_v2_quirk("_TZE204_p3lqqy2r", "TS0601") |
| 82 | + quirked = zigpy_device_from_v2_quirk(manuf, "TS0601") |
53 | 83 | ep = quirked.endpoints[1]
|
54 | 84 |
|
55 | 85 | assert ep.tuya_manufacturer is not None
|
|
0 commit comments