Skip to content

Commit 97b7e51

Browse files
valexi7epenet
andauthored
Add fixture for Tuya Wifi Knob Thermostat wk_t94pit6zjbask9qo (home-assistant#156781)
Co-authored-by: epenet <[email protected]>
1 parent 433712b commit 97b7e51

File tree

5 files changed

+325
-0
lines changed

5 files changed

+325
-0
lines changed

tests/components/tuya/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
"wk_fi6dne5tu4t1nm6j", # https://github.com/orgs/home-assistant/discussions/243
243243
"wk_gc1bxoq2hafxpa35", # https://github.com/home-assistant/core/issues/145551
244244
"wk_gogb05wrtredz3bs", # https://github.com/home-assistant/core/issues/136337
245+
"wk_t94pit6zjbask9qo", # https://github.com/home-assistant/core/pull/156781
245246
"wk_tfbhw0mg", # https://github.com/home-assistant/core/issues/152282
246247
"wk_y5obtqhuztqsf2mj", # https://github.com/home-assistant/core/issues/139735
247248
"wkcz_gc4b1mdw7kebtuyz", # https://github.com/home-assistant/core/issues/135617
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
{
2+
"endpoint": "https://apigw.tuyaeu.com",
3+
"mqtt_connected": true,
4+
"disabled_by": null,
5+
"disabled_polling": false,
6+
"name": "Floor Thermostat Kitchen",
7+
"category": "wk",
8+
"product_id": "t94pit6zjbask9qo",
9+
"product_name": "WiFi Knob Thermostat",
10+
"online": true,
11+
"sub": false,
12+
"time_zone": "+03:00",
13+
"active_time": "2025-10-07T08:19:14+00:00",
14+
"create_time": "2025-10-07T08:19:14+00:00",
15+
"update_time": "2025-10-07T08:19:14+00:00",
16+
"function": {
17+
"switch": {
18+
"type": "Boolean",
19+
"value": {}
20+
},
21+
"mode": {
22+
"type": "Enum",
23+
"value": { "range": ["auto", "manual", "off"] }
24+
},
25+
"temp_set": {
26+
"type": "Integer",
27+
"value": {
28+
"unit": "\u2103",
29+
"min": 50,
30+
"max": 350,
31+
"scale": 1,
32+
"step": 10
33+
}
34+
},
35+
"temp_set_f": {
36+
"type": "Integer",
37+
"value": {
38+
"unit": "\u2109",
39+
"min": 122,
40+
"max": 662,
41+
"scale": 1,
42+
"step": 10
43+
}
44+
},
45+
"temp_unit_convert": {
46+
"type": "Enum",
47+
"value": { "range": ["c", "f"] }
48+
},
49+
"work_days": {
50+
"type": "Enum",
51+
"value": { "range": ["5_2", "6_1", "7"] }
52+
},
53+
"factory_reset": {
54+
"type": "Boolean",
55+
"value": {}
56+
},
57+
"backlight": {
58+
"type": "Integer",
59+
"value": { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 1 }
60+
},
61+
"sensor_choose": {
62+
"type": "Enum",
63+
"value": { "range": ["in", "out"] }
64+
},
65+
"child_lock": {
66+
"type": "Boolean",
67+
"value": {}
68+
}
69+
},
70+
"status_range": {
71+
"switch": {
72+
"type": "Boolean",
73+
"value": {}
74+
},
75+
"mode": {
76+
"type": "Enum",
77+
"value": { "range": ["auto", "manual", "off"] }
78+
},
79+
"temp_set": {
80+
"type": "Integer",
81+
"value": {
82+
"unit": "\u2103",
83+
"min": 50,
84+
"max": 350,
85+
"scale": 1,
86+
"step": 10
87+
}
88+
},
89+
"temp_set_f": {
90+
"type": "Integer",
91+
"value": {
92+
"unit": "\u2109",
93+
"min": 122,
94+
"max": 662,
95+
"scale": 1,
96+
"step": 10
97+
}
98+
},
99+
"temp_unit_convert": {
100+
"type": "Enum",
101+
"value": { "range": ["c", "f"] }
102+
},
103+
"temp_current": {
104+
"type": "Integer",
105+
"value": { "unit": "\u2103", "min": 0, "max": 50, "scale": 0, "step": 1 }
106+
},
107+
"humidity": {
108+
"type": "Integer",
109+
"value": { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 1 }
110+
},
111+
"temp_current_f": {
112+
"type": "Integer",
113+
"value": {
114+
"unit": "\u2109",
115+
"min": -4,
116+
"max": 122,
117+
"scale": 0,
118+
"step": 1
119+
}
120+
},
121+
"work_days": {
122+
"type": "Enum",
123+
"value": { "range": ["5_2", "6_1", "7"] }
124+
},
125+
"work_state": {
126+
"type": "Enum",
127+
"value": { "range": ["opened", "closed"] }
128+
},
129+
"factory_reset": {
130+
"type": "Boolean",
131+
"value": {}
132+
},
133+
"backlight": {
134+
"type": "Integer",
135+
"value": { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 1 }
136+
},
137+
"fault": {
138+
"type": "Bitmap",
139+
"value": { "label": ["e1", "e2", "e3"] }
140+
},
141+
"sensor_choose": {
142+
"type": "Enum",
143+
"value": { "range": ["in", "out"] }
144+
},
145+
"child_lock": {
146+
"type": "Boolean",
147+
"value": {}
148+
}
149+
},
150+
"status": {
151+
"switch": true,
152+
"mode": "manual",
153+
"temp_set": 23,
154+
"temp_set_f": 41,
155+
"temp_unit_convert": "c",
156+
"temp_current": 20,
157+
"humidity": 91,
158+
"temp_current_f": -4,
159+
"work_days": "5_2",
160+
"work_state": "manual",
161+
"factory_reset": false,
162+
"backlight": 10,
163+
"fault": 0,
164+
"sensor_choose": "in"
165+
},
166+
"set_up": true,
167+
"support_local": true
168+
}

tests/components/tuya/snapshots/test_climate.ambr

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,83 @@
516516
'state': 'heat_cool',
517517
})
518518
# ---
519+
# name: test_platform_setup_and_discovery[climate.floor_thermostat_kitchen-entry]
520+
EntityRegistryEntrySnapshot({
521+
'aliases': set({
522+
}),
523+
'area_id': None,
524+
'capabilities': dict({
525+
'hvac_modes': list([
526+
<HVACMode.OFF: 'off'>,
527+
<HVACMode.HEAT_COOL: 'heat_cool'>,
528+
<HVACMode.HEAT_COOL: 'heat_cool'>,
529+
<HVACMode.HEAT_COOL: 'heat_cool'>,
530+
]),
531+
'max_temp': 35.0,
532+
'min_temp': 5.0,
533+
'preset_modes': list([
534+
'off',
535+
]),
536+
'target_temp_step': 1.0,
537+
}),
538+
'config_entry_id': <ANY>,
539+
'config_subentry_id': <ANY>,
540+
'device_class': None,
541+
'device_id': <ANY>,
542+
'disabled_by': None,
543+
'domain': 'climate',
544+
'entity_category': None,
545+
'entity_id': 'climate.floor_thermostat_kitchen',
546+
'has_entity_name': True,
547+
'hidden_by': None,
548+
'icon': None,
549+
'id': <ANY>,
550+
'labels': set({
551+
}),
552+
'name': None,
553+
'options': dict({
554+
}),
555+
'original_device_class': None,
556+
'original_icon': None,
557+
'original_name': None,
558+
'platform': 'tuya',
559+
'previous_unique_id': None,
560+
'suggested_object_id': None,
561+
'supported_features': <ClimateEntityFeature: 401>,
562+
'translation_key': None,
563+
'unique_id': 'tuya.oq9ksabjz6tip49tkw',
564+
'unit_of_measurement': None,
565+
})
566+
# ---
567+
# name: test_platform_setup_and_discovery[climate.floor_thermostat_kitchen-state]
568+
StateSnapshot({
569+
'attributes': ReadOnlyDict({
570+
'current_temperature': 20.0,
571+
'friendly_name': 'Floor Thermostat Kitchen',
572+
'hvac_modes': list([
573+
<HVACMode.OFF: 'off'>,
574+
<HVACMode.HEAT_COOL: 'heat_cool'>,
575+
<HVACMode.HEAT_COOL: 'heat_cool'>,
576+
<HVACMode.HEAT_COOL: 'heat_cool'>,
577+
]),
578+
'max_temp': 35.0,
579+
'min_temp': 5.0,
580+
'preset_mode': None,
581+
'preset_modes': list([
582+
'off',
583+
]),
584+
'supported_features': <ClimateEntityFeature: 401>,
585+
'target_temp_step': 1.0,
586+
'temperature': 2.3,
587+
}),
588+
'context': <ANY>,
589+
'entity_id': 'climate.floor_thermostat_kitchen',
590+
'last_changed': <ANY>,
591+
'last_reported': <ANY>,
592+
'last_updated': <ANY>,
593+
'state': 'heat_cool',
594+
})
595+
# ---
519596
# name: test_platform_setup_and_discovery[climate.geti_solar_pv_water_heater-entry]
520597
EntityRegistryEntrySnapshot({
521598
'aliases': set({

tests/components/tuya/snapshots/test_init.ambr

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5610,6 +5610,37 @@
56105610
'via_device_id': None,
56115611
})
56125612
# ---
5613+
# name: test_device_registry[oq9ksabjz6tip49tkw]
5614+
DeviceRegistryEntrySnapshot({
5615+
'area_id': None,
5616+
'config_entries': <ANY>,
5617+
'config_entries_subentries': <ANY>,
5618+
'configuration_url': None,
5619+
'connections': set({
5620+
}),
5621+
'disabled_by': None,
5622+
'entry_type': None,
5623+
'hw_version': None,
5624+
'id': <ANY>,
5625+
'identifiers': set({
5626+
tuple(
5627+
'tuya',
5628+
'oq9ksabjz6tip49tkw',
5629+
),
5630+
}),
5631+
'labels': set({
5632+
}),
5633+
'manufacturer': 'Tuya',
5634+
'model': 'WiFi Knob Thermostat',
5635+
'model_id': 't94pit6zjbask9qo',
5636+
'name': 'Floor Thermostat Kitchen',
5637+
'name_by_user': None,
5638+
'primary_config_entry': <ANY>,
5639+
'serial_number': None,
5640+
'sw_version': None,
5641+
'via_device_id': None,
5642+
})
5643+
# ---
56135644
# name: test_device_registry[oqyhsaqwsph]
56145645
DeviceRegistryEntrySnapshot({
56155646
'area_id': None,

tests/components/tuya/snapshots/test_switch.ambr

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3678,6 +3678,54 @@
36783678
'state': 'on',
36793679
})
36803680
# ---
3681+
# name: test_platform_setup_and_discovery[switch.floor_thermostat_kitchen_child_lock-entry]
3682+
EntityRegistryEntrySnapshot({
3683+
'aliases': set({
3684+
}),
3685+
'area_id': None,
3686+
'capabilities': None,
3687+
'config_entry_id': <ANY>,
3688+
'config_subentry_id': <ANY>,
3689+
'device_class': None,
3690+
'device_id': <ANY>,
3691+
'disabled_by': None,
3692+
'domain': 'switch',
3693+
'entity_category': <EntityCategory.CONFIG: 'config'>,
3694+
'entity_id': 'switch.floor_thermostat_kitchen_child_lock',
3695+
'has_entity_name': True,
3696+
'hidden_by': None,
3697+
'icon': None,
3698+
'id': <ANY>,
3699+
'labels': set({
3700+
}),
3701+
'name': None,
3702+
'options': dict({
3703+
}),
3704+
'original_device_class': None,
3705+
'original_icon': None,
3706+
'original_name': 'Child lock',
3707+
'platform': 'tuya',
3708+
'previous_unique_id': None,
3709+
'suggested_object_id': None,
3710+
'supported_features': 0,
3711+
'translation_key': 'child_lock',
3712+
'unique_id': 'tuya.oq9ksabjz6tip49tkwchild_lock',
3713+
'unit_of_measurement': None,
3714+
})
3715+
# ---
3716+
# name: test_platform_setup_and_discovery[switch.floor_thermostat_kitchen_child_lock-state]
3717+
StateSnapshot({
3718+
'attributes': ReadOnlyDict({
3719+
'friendly_name': 'Floor Thermostat Kitchen Child lock',
3720+
}),
3721+
'context': <ANY>,
3722+
'entity_id': 'switch.floor_thermostat_kitchen_child_lock',
3723+
'last_changed': <ANY>,
3724+
'last_reported': <ANY>,
3725+
'last_updated': <ANY>,
3726+
'state': 'unknown',
3727+
})
3728+
# ---
36813729
# name: test_platform_setup_and_discovery[switch.framboisier_child_lock-entry]
36823730
EntityRegistryEntrySnapshot({
36833731
'aliases': set({

0 commit comments

Comments
 (0)