From 0c875e4147573e1079a8d604504cfdcdb334302c Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Date: Sat, 3 Oct 2026 10:51:09 -0300 Subject: [PATCH] Add Tuya towel rack (mjj) fixture (#184134) Co-authored-by: Claude Opus 5.5 --- .../tuya/fixtures/mjj_sbcafqr6tykxq4bm.json | 149 ++++++++++++++++++ .../components/tuya/snapshots/test_init.ambr | 30 ++++ 2 files changed, 179 insertions(+) create mode 100644 tests/components/tuya/fixtures/mjj_sbcafqr6tykxq4bm.json diff --git a/tests/components/tuya/fixtures/mjj_sbcafqr6tykxq4bm.json b/tests/components/tuya/fixtures/mjj_sbcafqr6tykxq4bm.json new file mode 100644 index 000000000000..00244549c147 --- /dev/null +++ b/tests/components/tuya/fixtures/mjj_sbcafqr6tykxq4bm.json @@ -0,0 +1,149 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Towel Rack", + "category": "mjj", + "product_id": "sbcafqr6tykxq4bm", + "product_name": "Towel Rack", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2026-01-12T12:05:02+00:00", + "create_time": "2026-01-12T12:05:02+00:00", + "update_time": "2026-01-12T12:05:02+00:00", + "function": { + "switch": { + "type": "Boolean", + "value": {} + }, + "temp_set": { + "type": "Integer", + "value": { + "unit": "\u2103", + "min": 40, + "max": 80, + "scale": 0, + "step": 5 + } + }, + "child_lock": { + "type": "Boolean", + "value": {} + }, + "temp_unit_convert": { + "type": "Enum", + "value": { + "range": ["c", "f"] + } + }, + "temp_set_f": { + "type": "Integer", + "value": { + "unit": "\u2109", + "min": 100, + "max": 180, + "scale": 0, + "step": 10 + } + }, + "countdown_set": { + "type": "Enum", + "value": { + "range": ["cancel", "1h", "2h", "3h", "4h", "5h", "6h"] + } + } + }, + "status_range": { + "switch": { + "type": "Boolean", + "value": {} + }, + "temp_set": { + "type": "Integer", + "value": { + "unit": "\u2103", + "min": 40, + "max": 80, + "scale": 0, + "step": 5 + } + }, + "temp_current": { + "type": "Integer", + "value": { + "unit": "\u2103", + "min": 0, + "max": 99, + "scale": 0, + "step": 1 + } + }, + "child_lock": { + "type": "Boolean", + "value": {} + }, + "temp_unit_convert": { + "type": "Enum", + "value": { + "range": ["c", "f"] + } + }, + "temp_set_f": { + "type": "Integer", + "value": { + "unit": "\u2109", + "min": 100, + "max": 180, + "scale": 0, + "step": 10 + } + }, + "temp_current_f": { + "type": "Integer", + "value": { + "unit": "\u2109", + "min": 0, + "max": 199, + "scale": 0, + "step": 1 + } + }, + "countdown_set": { + "type": "Enum", + "value": { + "range": ["cancel", "1h", "2h", "3h", "4h", "5h", "6h"] + } + }, + "countdown_left": { + "type": "Integer", + "value": { + "unit": "min", + "min": 0, + "max": 1440, + "scale": 0, + "step": 1 + } + }, + "work_state": { + "type": "Enum", + "value": { + "range": ["heating", "standby"] + } + } + }, + "status": { + "switch": false, + "temp_set": 50, + "temp_current": 0, + "temp_unit_convert": "c", + "temp_set_f": 100, + "temp_current_f": 0, + "countdown_set": "8h", + "countdown_left": 0, + "work_state": "heating" + }, + "set_up": false, + "support_local": true +} diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index b987149b1075..912f6e3faf8e 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -5699,6 +5699,36 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[mb4qxkyt6rqfacbsjjm] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'mb4qxkyt6rqfacbsjjm', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Towel Rack', + 'model_id': 'sbcafqr6tykxq4bm', + 'name': 'Towel Rack', + 'name_by_user': None, + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[mgcpxpmovasazerdps] DeviceRegistryEntrySnapshot({ 'area_id': None,