Skip to content

Commit 382e7df

Browse files
authored
Add Tuya test fixtures (home-assistant#150622)
1 parent 5358c89 commit 382e7df

File tree

11 files changed

+1669
-0
lines changed

11 files changed

+1669
-0
lines changed

tests/components/tuya/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@
4141
"cz_anwgf2xugjxpkfxb", # https://github.com/orgs/home-assistant/discussions/539
4242
"cz_cuhokdii7ojyw8k2", # https://github.com/home-assistant/core/issues/149704
4343
"cz_dntgh2ngvshfxpsz", # https://github.com/home-assistant/core/issues/149704
44+
"cz_fencxse0bnut96ig", # https://github.com/home-assistant/core/issues/63978
4445
"cz_gbtxrqfy9xcsakyp", # https://github.com/home-assistant/core/issues/141278
4546
"cz_gjnozsaz", # https://github.com/orgs/home-assistant/discussions/482
4647
"cz_hA2GsgMfTQFTz9JL", # https://github.com/home-assistant/core/issues/148347
4748
"cz_hj0a5c7ckzzexu8l", # https://github.com/home-assistant/core/issues/149704
4849
"cz_ik9sbig3mthx9hjz", # https://github.com/home-assistant/core/issues/141278
50+
"cz_ipabufmlmodje1ws", # https://github.com/home-assistant/core/issues/63978
4951
"cz_jnbbxsb84gvvyfg5", # https://github.com/tuya/tuya-home-assistant/issues/754
5052
"cz_n8iVBAPLFKAAAszH", # https://github.com/home-assistant/core/issues/146164
5153
"cz_nkb0fmtlfyqosnvk", # https://github.com/orgs/home-assistant/discussions/482
@@ -61,6 +63,7 @@
6163
"cz_wifvoilfrqeo6hvu", # https://github.com/home-assistant/core/issues/146164
6264
"cz_wrz6vzch8htux2zp", # https://github.com/home-assistant/core/issues/141278
6365
"cz_y4jnobxh", # https://github.com/orgs/home-assistant/discussions/482
66+
"cz_z6pht25s3p0gs26q", # https://github.com/home-assistant/core/issues/63978
6467
"dc_l3bpgg8ibsagon4x", # https://github.com/home-assistant/core/issues/149704
6568
"dj_0gyaslysqfp4gfis", # https://github.com/home-assistant/core/issues/149895
6669
"dj_8szt7whdvwpmxglk", # https://github.com/home-assistant/core/issues/149704
@@ -167,6 +170,7 @@
167170
"wg2_v7owd9tzcaninc36", # https://github.com/orgs/home-assistant/discussions/539
168171
"wk_6kijc7nd", # https://github.com/home-assistant/core/issues/136513
169172
"wk_aqoouq7x", # https://github.com/home-assistant/core/issues/146263
173+
"wk_ccpwojhalfxryigz", # https://github.com/home-assistant/core/issues/145551
170174
"wk_fi6dne5tu4t1nm6j", # https://github.com/orgs/home-assistant/discussions/243
171175
"wk_gogb05wrtredz3bs", # https://github.com/home-assistant/core/issues/136337
172176
"wk_y5obtqhuztqsf2mj", # https://github.com/home-assistant/core/issues/139735
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"endpoint": "https://openapi.tuyaeu.com",
3+
"auth_type": 0,
4+
"country_code": "46",
5+
"app_type": "smartlife",
6+
"mqtt_connected": true,
7+
"disabled_by": null,
8+
"disabled_polling": false,
9+
"name": "Spa",
10+
"model": "JLCZ8266",
11+
"category": "cz",
12+
"product_id": "fencxse0bnut96ig",
13+
"product_name": "smart plug",
14+
"online": true,
15+
"sub": false,
16+
"time_zone": "+01:00",
17+
"active_time": "2022-01-28T07:32:38+00:00",
18+
"create_time": "2022-01-28T07:32:38+00:00",
19+
"update_time": "2022-01-28T07:32:52+00:00",
20+
"function": {
21+
"switch_1": {
22+
"type": "Boolean",
23+
"value": {}
24+
},
25+
"countdown_1": {
26+
"type": "Integer",
27+
"value": {
28+
"unit": "s",
29+
"min": 0,
30+
"max": 86400,
31+
"scale": 0,
32+
"step": 1
33+
}
34+
}
35+
},
36+
"status_range": {
37+
"switch_1": {
38+
"type": "Boolean",
39+
"value": {}
40+
},
41+
"countdown_1": {
42+
"type": "Integer",
43+
"value": {
44+
"unit": "s",
45+
"min": 0,
46+
"max": 86400,
47+
"scale": 0,
48+
"step": 1
49+
}
50+
},
51+
"add_ele": {
52+
"type": "Integer",
53+
"value": {
54+
"unit": "kwh",
55+
"min": 0,
56+
"max": 50000,
57+
"scale": 3,
58+
"step": 100
59+
}
60+
},
61+
"cur_current": {
62+
"type": "Integer",
63+
"value": {
64+
"unit": "mA",
65+
"min": 0,
66+
"max": 30000,
67+
"scale": 0,
68+
"step": 1
69+
}
70+
},
71+
"cur_power": {
72+
"type": "Integer",
73+
"value": {
74+
"unit": "W",
75+
"min": 0,
76+
"max": 50000,
77+
"scale": 1,
78+
"step": 1
79+
}
80+
},
81+
"cur_voltage": {
82+
"type": "Integer",
83+
"value": {
84+
"unit": "V",
85+
"min": 0,
86+
"max": 5000,
87+
"scale": 1,
88+
"step": 1
89+
}
90+
}
91+
},
92+
"status": {
93+
"switch_1": true,
94+
"countdown_1": 0,
95+
"add_ele": 203,
96+
"cur_current": 5404,
97+
"cur_power": 12018,
98+
"cur_voltage": 2381
99+
}
100+
}
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
{
2+
"endpoint": "https://openapi.tuyaeu.com",
3+
"auth_type": 0,
4+
"country_code": "46",
5+
"app_type": "smartlife",
6+
"mqtt_connected": true,
7+
"disabled_by": null,
8+
"disabled_polling": false,
9+
"name": "V\u00e4rmelampa",
10+
"model": "FK-PW802EC-F",
11+
"category": "cz",
12+
"product_id": "ipabufmlmodje1ws",
13+
"product_name": "",
14+
"online": true,
15+
"sub": false,
16+
"time_zone": "+01:00",
17+
"active_time": "2022-01-22T12:55:50+00:00",
18+
"create_time": "2022-01-21T20:32:42+00:00",
19+
"update_time": "2022-01-22T12:55:53+00:00",
20+
"function": {
21+
"switch_1": {
22+
"type": "Boolean",
23+
"value": {}
24+
},
25+
"countdown_1": {
26+
"type": "Integer",
27+
"value": {
28+
"unit": "s",
29+
"min": 0,
30+
"max": 86400,
31+
"scale": 0,
32+
"step": 1
33+
}
34+
},
35+
"add_ele": {
36+
"type": "Integer",
37+
"value": {
38+
"unit": "kwh",
39+
"min": 0,
40+
"max": 50000,
41+
"scale": 3,
42+
"step": 100
43+
}
44+
}
45+
},
46+
"status_range": {
47+
"switch_1": {
48+
"type": "Boolean",
49+
"value": {}
50+
},
51+
"add_ele": {
52+
"type": "Integer",
53+
"value": {
54+
"unit": "kwh",
55+
"min": 0,
56+
"max": 50000,
57+
"scale": 3,
58+
"step": 100
59+
}
60+
},
61+
"cur_current": {
62+
"type": "Integer",
63+
"value": {
64+
"unit": "mA",
65+
"min": 0,
66+
"max": 30000,
67+
"scale": 0,
68+
"step": 1
69+
}
70+
},
71+
"cur_power": {
72+
"type": "Integer",
73+
"value": {
74+
"unit": "W",
75+
"min": 0,
76+
"max": 50000,
77+
"scale": 0,
78+
"step": 1
79+
}
80+
},
81+
"cur_voltage": {
82+
"type": "Integer",
83+
"value": {
84+
"unit": "V",
85+
"min": 0,
86+
"max": 5000,
87+
"scale": 1,
88+
"step": 1
89+
}
90+
},
91+
"test_bit": {
92+
"type": "Integer",
93+
"value": {
94+
"unit": "",
95+
"min": 0,
96+
"max": 5,
97+
"scale": 0,
98+
"step": 1
99+
}
100+
},
101+
"voltage_coe": {
102+
"type": "Integer",
103+
"value": {
104+
"unit": "",
105+
"min": 0,
106+
"max": 1000000,
107+
"scale": 0,
108+
"step": 1
109+
}
110+
},
111+
"electric_coe": {
112+
"type": "Integer",
113+
"value": {
114+
"unit": "",
115+
"min": 0,
116+
"max": 1000000,
117+
"scale": 0,
118+
"step": 1
119+
}
120+
},
121+
"power_coe": {
122+
"type": "Integer",
123+
"value": {
124+
"unit": "",
125+
"min": 0,
126+
"max": 1000000,
127+
"scale": 0,
128+
"step": 1
129+
}
130+
},
131+
"electricity_coe": {
132+
"type": "Integer",
133+
"value": {
134+
"unit": "",
135+
"min": 0,
136+
"max": 1000000,
137+
"scale": 0,
138+
"step": 1
139+
}
140+
},
141+
"countdown_1": {
142+
"type": "Integer",
143+
"value": {
144+
"unit": "s",
145+
"min": 0,
146+
"max": 86400,
147+
"scale": 0,
148+
"step": 1
149+
}
150+
}
151+
},
152+
"status": {
153+
"switch_1": true,
154+
"countdown_1": 0,
155+
"add_ele": 82,
156+
"cur_current": 435,
157+
"cur_power": 1642,
158+
"cur_voltage": 2246,
159+
"test_bit": 1,
160+
"voltage_coe": 632,
161+
"electric_coe": 10795,
162+
"power_coe": 10197,
163+
"electricity_coe": 4090
164+
}
165+
}

0 commit comments

Comments
 (0)