Skip to content

Commit 34b0b71

Browse files
authored
Add Tuya snapshot tests for empty electricity RAW sensors (#150407)
1 parent 203c908 commit 34b0b71

File tree

4 files changed

+831
-0
lines changed

4 files changed

+831
-0
lines changed

tests/components/tuya/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"dlq_jdj6ccklup7btq3a", # https://github.com/home-assistant/core/issues/143209
100100
"dlq_kxdr6su0c55p7bbo", # https://github.com/home-assistant/core/issues/143499
101101
"dlq_r9kg2g1uhhyicycb", # https://github.com/home-assistant/core/issues/149650
102+
"dlq_z3jngbyubvwgfrcv", # https://github.com/home-assistant/core/issues/150293
102103
"dr_pjvxl1wsyqxivsaf", # https://github.com/home-assistant/core/issues/84869
103104
"fs_g0ewlb1vmwqljzji", # https://github.com/home-assistant/core/issues/141231
104105
"fs_ibytpo6fpnugft1c", # https://github.com/home-assistant/core/issues/135541
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
{
2+
"endpoint": "https://apigw.tuyaeu.com",
3+
"mqtt_connected": true,
4+
"disabled_by": null,
5+
"disabled_polling": false,
6+
"name": "Edesanya Energy",
7+
"category": "dlq",
8+
"product_id": "z3jngbyubvwgfrcv",
9+
"product_name": "Breaker",
10+
"online": true,
11+
"sub": false,
12+
"time_zone": "+03:00",
13+
"active_time": "2025-06-16T11:30:16+00:00",
14+
"create_time": "2025-06-16T11:30:16+00:00",
15+
"update_time": "2025-06-16T11:30:16+00:00",
16+
"function": {
17+
"switch_prepayment": {
18+
"type": "Boolean",
19+
"value": {}
20+
},
21+
"clear_energy": {
22+
"type": "Boolean",
23+
"value": {}
24+
},
25+
"charge_energy": {
26+
"type": "Integer",
27+
"value": {
28+
"unit": "kW\u00b7h",
29+
"min": 0,
30+
"max": 999999,
31+
"scale": 2,
32+
"step": 1
33+
}
34+
},
35+
"switch": {
36+
"type": "Boolean",
37+
"value": {}
38+
},
39+
"alarm_set_1": {
40+
"type": "Raw",
41+
"value": {}
42+
},
43+
"alarm_set_2": {
44+
"type": "Raw",
45+
"value": {}
46+
},
47+
"countdown_1": {
48+
"type": "Integer",
49+
"value": {
50+
"unit": "s",
51+
"min": 0,
52+
"max": 86400,
53+
"scale": 0,
54+
"step": 1
55+
}
56+
},
57+
"cycle_time": {
58+
"type": "String",
59+
"value": {
60+
"maxlen": 255
61+
}
62+
},
63+
"random_time": {
64+
"type": "String",
65+
"value": {}
66+
}
67+
},
68+
"status_range": {
69+
"total_forward_energy": {
70+
"type": "Integer",
71+
"value": {
72+
"unit": "kW\u00b7h",
73+
"min": 0,
74+
"max": 99999999,
75+
"scale": 2,
76+
"step": 1
77+
}
78+
},
79+
"phase_a": {
80+
"type": "Raw",
81+
"value": {}
82+
},
83+
"phase_b": {
84+
"type": "Raw",
85+
"value": {}
86+
},
87+
"phase_c": {
88+
"type": "Raw",
89+
"value": {}
90+
},
91+
"fault": {
92+
"type": "Bitmap",
93+
"value": {
94+
"label": [
95+
"short_circuit_alarm",
96+
"surge_alarm",
97+
"overload_alarm",
98+
"leakagecurr_alarm",
99+
"temp_dif_fault",
100+
"fire_alarm",
101+
"high_power_alarm",
102+
"self_test_alarm",
103+
"ov_cr",
104+
"unbalance_alarm",
105+
"ov_vol",
106+
"undervoltage_alarm",
107+
"miss_phase_alarm",
108+
"outage_alarm",
109+
"magnetism_alarm",
110+
"credit_alarm",
111+
"no_balance_alarm",
112+
"phase_seq_err_alarm",
113+
"vol_unbalance_alarm",
114+
"low_current_alarm"
115+
]
116+
}
117+
},
118+
"switch_prepayment": {
119+
"type": "Boolean",
120+
"value": {}
121+
},
122+
"energy_reset": {
123+
"type": "Enum",
124+
"value": {
125+
"range": ["empty"]
126+
}
127+
},
128+
"balance_energy": {
129+
"type": "Integer",
130+
"value": {
131+
"unit": "kW\u00b7h",
132+
"min": 0,
133+
"max": 99999999,
134+
"scale": 2,
135+
"step": 1
136+
}
137+
},
138+
"charge_energy": {
139+
"type": "Integer",
140+
"value": {
141+
"unit": "kW\u00b7h",
142+
"min": 0,
143+
"max": 999999,
144+
"scale": 2,
145+
"step": 1
146+
}
147+
},
148+
"leakage_current": {
149+
"type": "Integer",
150+
"value": {
151+
"unit": "mA",
152+
"min": 0,
153+
"max": 1000,
154+
"scale": 0,
155+
"step": 1
156+
}
157+
},
158+
"switch": {
159+
"type": "Boolean",
160+
"value": {}
161+
},
162+
"alarm_set_1": {
163+
"type": "Raw",
164+
"value": {}
165+
},
166+
"alarm_set_2": {
167+
"type": "Raw",
168+
"value": {}
169+
},
170+
"temp_current": {
171+
"type": "Integer",
172+
"value": {
173+
"unit": "\u2103",
174+
"min": -20,
175+
"max": 200,
176+
"scale": 0,
177+
"step": 1
178+
}
179+
},
180+
"countdown_1": {
181+
"type": "Integer",
182+
"value": {
183+
"unit": "s",
184+
"min": 0,
185+
"max": 86400,
186+
"scale": 0,
187+
"step": 1
188+
}
189+
},
190+
"cycle_time": {
191+
"type": "String",
192+
"value": {
193+
"maxlen": 255
194+
}
195+
},
196+
"random_time": {
197+
"type": "String",
198+
"value": {}
199+
}
200+
},
201+
"status": {
202+
"total_forward_energy": 21972,
203+
"phase_a": "CT0AAmAAAIU=",
204+
"phase_b": "",
205+
"phase_c": "",
206+
"fault": 0,
207+
"switch_prepayment": false,
208+
"energy_reset": "",
209+
"balance_energy": 0,
210+
"charge_energy": 0,
211+
"leakage_current": 0,
212+
"switch": true,
213+
"alarm_set_1": "BAEAMgUBAFA=",
214+
"alarm_set_2": "AQECdgMBARMEAQCv",
215+
"temp_current": 24,
216+
"countdown_1": 0,
217+
"cycle_time": "EwAAAAAAAAAAAA==",
218+
"random_time": ""
219+
},
220+
"set_up": true,
221+
"support_local": true
222+
}

0 commit comments

Comments
 (0)