From 7fba94747e4fdb40e3ab9fcf0c955bef39361d1c Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sun, 17 Aug 2025 14:05:58 +0200 Subject: [PATCH] Add Tuya test fixtures (#150793) --- tests/components/tuya/__init__.py | 7 + .../tuya/fixtures/cz_CHLZe9HQ6QIXujVN.json | 54 ++ .../tuya/fixtures/cz_iqhidxhhmgxk5eja.json | 54 ++ .../tuya/fixtures/dd_gaobbrxqiblcng2p.json | 21 + .../tuya/fixtures/dj_qoqolwtqzfuhgghq.json | 477 ++++++++++++++++++ .../tuya/fixtures/hwsb_ircs2n82vgrozoew.json | 34 ++ .../tuya/fixtures/mc_oSQljE9YDqwCwTUA.json | 35 ++ .../tuya/fixtures/qn_5ls2jw49hpczwqng.json | 21 + .../tuya/snapshots/test_climate.ambr | 61 +++ .../components/tuya/snapshots/test_init.ambr | 217 ++++++++ .../components/tuya/snapshots/test_light.ambr | 73 +++ .../tuya/snapshots/test_sensor.ambr | 48 ++ .../tuya/snapshots/test_switch.ambr | 98 ++++ 13 files changed, 1200 insertions(+) create mode 100644 tests/components/tuya/fixtures/cz_CHLZe9HQ6QIXujVN.json create mode 100644 tests/components/tuya/fixtures/cz_iqhidxhhmgxk5eja.json create mode 100644 tests/components/tuya/fixtures/dd_gaobbrxqiblcng2p.json create mode 100644 tests/components/tuya/fixtures/dj_qoqolwtqzfuhgghq.json create mode 100644 tests/components/tuya/fixtures/hwsb_ircs2n82vgrozoew.json create mode 100644 tests/components/tuya/fixtures/mc_oSQljE9YDqwCwTUA.json create mode 100644 tests/components/tuya/fixtures/qn_5ls2jw49hpczwqng.json diff --git a/tests/components/tuya/__init__.py b/tests/components/tuya/__init__.py index 537fc98854a..df98bb0385f 100644 --- a/tests/components/tuya/__init__.py +++ b/tests/components/tuya/__init__.py @@ -37,6 +37,7 @@ DEVICE_MOCKS = [ "cz_39sy2g68gsjwo2xv", # https://github.com/home-assistant/core/issues/141278 "cz_6fa7odsufen374x2", # https://github.com/home-assistant/core/issues/150029 "cz_9ivirni8wemum6cw", # https://github.com/home-assistant/core/issues/139735 + "cz_CHLZe9HQ6QIXujVN", # https://github.com/home-assistant/core/issues/149233 "cz_HBRBzv1UVBVfF6SL", # https://github.com/tuya/tuya-home-assistant/issues/754 "cz_anwgf2xugjxpkfxb", # https://github.com/orgs/home-assistant/discussions/539 "cz_cuhokdii7ojyw8k2", # https://github.com/home-assistant/core/issues/149704 @@ -48,6 +49,7 @@ DEVICE_MOCKS = [ "cz_hj0a5c7ckzzexu8l", # https://github.com/home-assistant/core/issues/149704 "cz_ik9sbig3mthx9hjz", # https://github.com/home-assistant/core/issues/141278 "cz_ipabufmlmodje1ws", # https://github.com/home-assistant/core/issues/63978 + "cz_iqhidxhhmgxk5eja", # https://github.com/home-assistant/core/issues/149233 "cz_jnbbxsb84gvvyfg5", # https://github.com/tuya/tuya-home-assistant/issues/754 "cz_n8iVBAPLFKAAAszH", # https://github.com/home-assistant/core/issues/146164 "cz_nkb0fmtlfyqosnvk", # https://github.com/orgs/home-assistant/discussions/482 @@ -65,6 +67,7 @@ DEVICE_MOCKS = [ "cz_y4jnobxh", # https://github.com/orgs/home-assistant/discussions/482 "cz_z6pht25s3p0gs26q", # https://github.com/home-assistant/core/issues/63978 "dc_l3bpgg8ibsagon4x", # https://github.com/home-assistant/core/issues/149704 + "dd_gaobbrxqiblcng2p", # https://github.com/home-assistant/core/issues/149233 "dj_0gyaslysqfp4gfis", # https://github.com/home-assistant/core/issues/149895 "dj_8szt7whdvwpmxglk", # https://github.com/home-assistant/core/issues/149704 "dj_8y0aquaa8v6tho8w", # https://github.com/home-assistant/core/issues/149704 @@ -89,6 +92,7 @@ DEVICE_MOCKS = [ "dj_nbumqpv8vz61enji", # https://github.com/home-assistant/core/issues/149704 "dj_nlxvjzy1hoeiqsg6", # https://github.com/home-assistant/core/issues/149704 "dj_oe0cpnjg", # https://github.com/home-assistant/core/issues/149704 + "dj_qoqolwtqzfuhgghq", # https://github.com/home-assistant/core/issues/149233 "dj_riwp3k79", # https://github.com/home-assistant/core/issues/149704 "dj_tgewj70aowigv8fz", # https://github.com/orgs/home-assistant/discussions/539 "dj_tmsloaroqavbucgn", # https://github.com/home-assistant/core/issues/149704 @@ -111,6 +115,7 @@ DEVICE_MOCKS = [ "gyd_lgekqfxdabipm3tn", # https://github.com/home-assistant/core/issues/133173 "hps_2aaelwxk", # https://github.com/home-assistant/core/issues/149704 "hps_wqashyqo", # https://github.com/home-assistant/core/issues/146180 + "hwsb_ircs2n82vgrozoew", # https://github.com/home-assistant/core/issues/149233 "kg_4nqs33emdwJxpQ8O", # https://github.com/orgs/home-assistant/discussions/539 "kg_5ftkaulg", # https://github.com/orgs/home-assistant/discussions/539 "kg_gbm9ata1zrzaez4a", # https://github.com/home-assistant/core/issues/148347 @@ -124,6 +129,7 @@ DEVICE_MOCKS = [ "kt_vdadlnmsorlhw4td", # https://github.com/home-assistant/core/pull/149635 "ldcg_9kbbfeho", # https://github.com/orgs/home-assistant/discussions/482 "mal_gyitctrjj1kefxp2", # Alarm Host support + "mc_oSQljE9YDqwCwTUA", # https://github.com/home-assistant/core/issues/149233 "mcs_6ywsnauy", # https://github.com/orgs/home-assistant/discussions/482 "mcs_7jIGJAymiH8OsFFb", # https://github.com/home-assistant/core/issues/108301 "mcs_8yhypbo7", # https://github.com/orgs/home-assistant/discussions/482 @@ -139,6 +145,7 @@ DEVICE_MOCKS = [ "pir_fcdjzz3s", # https://github.com/home-assistant/core/issues/149704 "pir_wqz93nrdomectyoz", # https://github.com/home-assistant/core/issues/149704 "qccdz_7bvgooyjhiua1yyq", # https://github.com/home-assistant/core/issues/136207 + "qn_5ls2jw49hpczwqng", # https://github.com/home-assistant/core/issues/149233 "qxj_fsea1lat3vuktbt6", # https://github.com/orgs/home-assistant/discussions/318 "qxj_is2indt9nlth6esa", # https://github.com/home-assistant/core/issues/136472 "rqbj_4iqe2hsfyd86kwwc", # https://github.com/orgs/home-assistant/discussions/100 diff --git a/tests/components/tuya/fixtures/cz_CHLZe9HQ6QIXujVN.json b/tests/components/tuya/fixtures/cz_CHLZe9HQ6QIXujVN.json new file mode 100644 index 00000000000..2328e901065 --- /dev/null +++ b/tests/components/tuya/fixtures/cz_CHLZe9HQ6QIXujVN.json @@ -0,0 +1,54 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "schuur", + "category": "cz", + "product_id": "CHLZe9HQ6QIXujVN", + "product_name": "Smart Plug", + "online": true, + "sub": false, + "time_zone": "+01:00", + "active_time": "2019-12-02T17:58:38+00:00", + "create_time": "2019-12-02T17:58:38+00:00", + "update_time": "2019-12-02T17:58:38+00:00", + "function": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "switch_1": false, + "countdown_1": 0 + }, + "set_up": true, + "support_local": true +} diff --git a/tests/components/tuya/fixtures/cz_iqhidxhhmgxk5eja.json b/tests/components/tuya/fixtures/cz_iqhidxhhmgxk5eja.json new file mode 100644 index 00000000000..958d400eb0e --- /dev/null +++ b/tests/components/tuya/fixtures/cz_iqhidxhhmgxk5eja.json @@ -0,0 +1,54 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Powerplug 5", + "category": "cz", + "product_id": "iqhidxhhmgxk5eja", + "product_name": "Smart Plug", + "online": true, + "sub": false, + "time_zone": "+01:00", + "active_time": "2020-05-25T11:34:43+00:00", + "create_time": "2020-05-25T11:34:43+00:00", + "update_time": "2020-05-25T11:34:43+00:00", + "function": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "switch_1": false, + "countdown_1": 0 + }, + "set_up": true, + "support_local": true +} diff --git a/tests/components/tuya/fixtures/dd_gaobbrxqiblcng2p.json b/tests/components/tuya/fixtures/dd_gaobbrxqiblcng2p.json new file mode 100644 index 00000000000..b0135acba1c --- /dev/null +++ b/tests/components/tuya/fixtures/dd_gaobbrxqiblcng2p.json @@ -0,0 +1,21 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "TV Sync Backlights", + "category": "dd", + "product_id": "gaobbrxqiblcng2p", + "product_name": "TV Sync Backlights", + "online": true, + "sub": false, + "time_zone": "+02:00", + "active_time": "2024-08-31T10:40:08+00:00", + "create_time": "2024-08-31T10:40:08+00:00", + "update_time": "2024-08-31T10:40:08+00:00", + "function": {}, + "status_range": {}, + "status": {}, + "set_up": false, + "support_local": true +} diff --git a/tests/components/tuya/fixtures/dj_qoqolwtqzfuhgghq.json b/tests/components/tuya/fixtures/dj_qoqolwtqzfuhgghq.json new file mode 100644 index 00000000000..e623ac6f7c0 --- /dev/null +++ b/tests/components/tuya/fixtures/dj_qoqolwtqzfuhgghq.json @@ -0,0 +1,477 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Smart Bulb RGBCW", + "category": "dj", + "product_id": "qoqolwtqzfuhgghq", + "product_name": "Smart Bulb RGBCW", + "online": true, + "sub": false, + "time_zone": "+01:00", + "active_time": "2022-01-04T09:40:06+00:00", + "create_time": "2022-01-04T09:40:06+00:00", + "update_time": "2022-01-04T09:40:06+00:00", + "function": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "switch_led": false, + "work_mode": "white", + "bright_value_v2": 1000, + "temp_value_v2": 435, + "colour_data_v2": { + "h": 35, + "s": 760, + "v": 1000 + }, + "scene_data_v2": { + "scene_num": 1, + "scene_units": [ + { + "bright": 1000, + "h": 0, + "s": 0, + "temperature": 85, + "unit_change_mode": "static", + "unit_gradient_duration": 13, + "unit_switch_duration": 14, + "v": 0 + } + ] + }, + "countdown_1": 0, + "music_data": "", + "control_data": "" + }, + "set_up": true, + "support_local": true +} diff --git a/tests/components/tuya/fixtures/hwsb_ircs2n82vgrozoew.json b/tests/components/tuya/fixtures/hwsb_ircs2n82vgrozoew.json new file mode 100644 index 00000000000..228f4848d5e --- /dev/null +++ b/tests/components/tuya/fixtures/hwsb_ircs2n82vgrozoew.json @@ -0,0 +1,34 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "InverFlow", + "category": "hwsb", + "product_id": "ircs2n82vgrozoew", + "product_name": "InverFlow", + "online": true, + "sub": false, + "time_zone": "+02:00", + "active_time": "2025-08-08T12:44:43+00:00", + "create_time": "2025-08-08T12:44:43+00:00", + "update_time": "2025-08-08T12:44:43+00:00", + "function": {}, + "status_range": { + "cur_power": { + "type": "Integer", + "value": { + "unit": "W", + "min": 0, + "max": 3000, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "cur_power": 405 + }, + "set_up": false, + "support_local": true +} diff --git a/tests/components/tuya/fixtures/mc_oSQljE9YDqwCwTUA.json b/tests/components/tuya/fixtures/mc_oSQljE9YDqwCwTUA.json new file mode 100644 index 00000000000..16d51063dc1 --- /dev/null +++ b/tests/components/tuya/fixtures/mc_oSQljE9YDqwCwTUA.json @@ -0,0 +1,35 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Kippenluik", + "category": "mc", + "product_id": "oSQljE9YDqwCwTUA", + "product_name": "Door Sensor", + "online": true, + "sub": false, + "time_zone": "+01:00", + "active_time": "2023-10-28T09:22:24+00:00", + "create_time": "2023-10-28T09:22:24+00:00", + "update_time": "2023-10-28T09:22:24+00:00", + "function": {}, + "status_range": { + "doorcontact_state": { + "type": "Boolean", + "value": {} + }, + "battery_state": { + "type": "Enum", + "value": { + "range": ["low", "middle", "high"] + } + } + }, + "status": { + "doorcontact_state": true, + "battery_state": "high" + }, + "set_up": true, + "support_local": true +} diff --git a/tests/components/tuya/fixtures/qn_5ls2jw49hpczwqng.json b/tests/components/tuya/fixtures/qn_5ls2jw49hpczwqng.json new file mode 100644 index 00000000000..37f16b0d40a --- /dev/null +++ b/tests/components/tuya/fixtures/qn_5ls2jw49hpczwqng.json @@ -0,0 +1,21 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Mr. Pure", + "category": "qn", + "product_id": "5ls2jw49hpczwqng", + "product_name": "Mr. Pure", + "online": true, + "sub": false, + "time_zone": "+02:00", + "active_time": "2025-08-08T12:47:09+00:00", + "create_time": "2025-08-08T12:47:09+00:00", + "update_time": "2025-08-08T12:47:09+00:00", + "function": {}, + "status_range": {}, + "status": {}, + "set_up": true, + "support_local": true +} diff --git a/tests/components/tuya/snapshots/test_climate.ambr b/tests/components/tuya/snapshots/test_climate.ambr index 445fb3f8cc6..e075636be4f 100644 --- a/tests/components/tuya/snapshots/test_climate.ambr +++ b/tests/components/tuya/snapshots/test_climate.ambr @@ -370,6 +370,67 @@ 'state': 'cool', }) # --- +# name: test_platform_setup_and_discovery[climate.mr_pure-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'hvac_modes': list([ + ]), + 'max_temp': 35, + 'min_temp': 7, + 'target_temp_step': 1.0, + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'climate', + 'entity_category': None, + 'entity_id': 'climate.mr_pure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.gnqwzcph94wj2sl5nq', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[climate.mr_pure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'current_temperature': None, + 'friendly_name': 'Mr. Pure', + 'hvac_modes': list([ + ]), + 'max_temp': 35, + 'min_temp': 7, + 'supported_features': , + 'target_temp_step': 1.0, + }), + 'context': , + 'entity_id': 'climate.mr_pure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[climate.smart_thermostats-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index 4491ce180ac..1e7ce8bdbff 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -960,6 +960,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[AUTwCwqDY9EjlQSocm] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'AUTwCwqDY9EjlQSocm', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Door Sensor', + 'model_id': 'oSQljE9YDqwCwTUA', + 'name': 'Kippenluik', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[CyD4ctKVrAFSSXSbjd] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -1084,6 +1115,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[NVjuXIQ6QH9eZLHCzc] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'NVjuXIQ6QH9eZLHCzc', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart Plug', + 'model_id': 'CHLZe9HQ6QIXujVN', + 'name': 'schuur', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[O8QpxJwdme33sqn4gk] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -1239,6 +1301,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[aje5kxgmhhxdihqizc] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'aje5kxgmhhxdihqizc', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart Plug', + 'model_id': 'iqhidxhhmgxk5eja', + 'name': 'Powerplug 5', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[ajkdo1bm2rcmpuufjd] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -2417,6 +2510,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[gnqwzcph94wj2sl5nq] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'gnqwzcph94wj2sl5nq', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Mr. Pure', + 'model_id': '5ls2jw49hpczwqng', + 'name': 'Mr. Pure', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[gt1q9tldv1opojrtcp] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -3936,6 +4060,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[p2gnclbiqxrbboagdd] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'p2gnclbiqxrbboagdd', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'TV Sync Backlights (unsupported)', + 'model_id': 'gaobbrxqiblcng2p', + 'name': 'TV Sync Backlights', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[p8xoxccrjbwy] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -4215,6 +4370,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[qhgghufzqtwloqoqjd] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'qhgghufzqtwloqoqjd', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart Bulb RGBCW', + 'model_id': 'qoqolwtqzfuhgghq', + 'name': 'Smart Bulb RGBCW', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[qi94v9dmdx4fkpncqld] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -5362,6 +5548,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[weozorgv28n2scribswh] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'weozorgv28n2scribswh', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'InverFlow (unsupported)', + 'model_id': 'ircs2n82vgrozoew', + 'name': 'InverFlow', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[x4nogasbi8ggpb3lcd] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/tuya/snapshots/test_light.ambr b/tests/components/tuya/snapshots/test_light.ambr index 40c2b7451d2..9abbf3c40f4 100644 --- a/tests/components/tuya/snapshots/test_light.ambr +++ b/tests/components/tuya/snapshots/test_light.ambr @@ -2470,6 +2470,79 @@ 'state': 'off', }) # --- +# name: test_platform_setup_and_discovery[light.smart_bulb_rgbcw-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'max_color_temp_kelvin': 6500, + 'max_mireds': 500, + 'min_color_temp_kelvin': 2000, + 'min_mireds': 153, + 'supported_color_modes': list([ + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'light', + 'entity_category': None, + 'entity_id': 'light.smart_bulb_rgbcw', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.qhgghufzqtwloqoqjdswitch_led', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[light.smart_bulb_rgbcw-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'brightness': None, + 'color_mode': None, + 'color_temp': None, + 'color_temp_kelvin': None, + 'friendly_name': 'Smart Bulb RGBCW', + 'hs_color': None, + 'max_color_temp_kelvin': 6500, + 'max_mireds': 500, + 'min_color_temp_kelvin': 2000, + 'min_mireds': 153, + 'rgb_color': None, + 'supported_color_modes': list([ + , + , + ]), + 'supported_features': , + 'xy_color': None, + }), + 'context': , + 'entity_id': 'light.smart_bulb_rgbcw', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[light.solar_zijpad-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tuya/snapshots/test_sensor.ambr b/tests/components/tuya/snapshots/test_sensor.ambr index b8e84328e1f..b2c0b92bd30 100644 --- a/tests/components/tuya/snapshots/test_sensor.ambr +++ b/tests/components/tuya/snapshots/test_sensor.ambr @@ -7079,6 +7079,54 @@ 'state': '0.0', }) # --- +# name: test_platform_setup_and_discovery[sensor.kippenluik_battery_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.kippenluik_battery_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Battery state', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery_state', + 'unique_id': 'tuya.AUTwCwqDY9EjlQSocmbattery_state', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.kippenluik_battery_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Kippenluik Battery state', + }), + 'context': , + 'entity_id': 'sensor.kippenluik_battery_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'high', + }) +# --- # name: test_platform_setup_and_discovery[sensor.lave_linge_current-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tuya/snapshots/test_switch.ambr b/tests/components/tuya/snapshots/test_switch.ambr index 2e5d1066fef..8e139b64876 100644 --- a/tests/components/tuya/snapshots/test_switch.ambr +++ b/tests/components/tuya/snapshots/test_switch.ambr @@ -5804,6 +5804,55 @@ 'state': 'off', }) # --- +# name: test_platform_setup_and_discovery[switch.powerplug_5_socket_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.powerplug_5_socket_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Socket 1', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_socket', + 'unique_id': 'tuya.aje5kxgmhhxdihqizcswitch_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[switch.powerplug_5_socket_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'outlet', + 'friendly_name': 'Powerplug 5 Socket 1', + }), + 'context': , + 'entity_id': 'switch.powerplug_5_socket_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[switch.pro_breeze_30l_compressor_dehumidifier_ionizer-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -6097,6 +6146,55 @@ 'state': 'on', }) # --- +# name: test_platform_setup_and_discovery[switch.schuur_socket_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.schuur_socket_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Socket 1', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_socket', + 'unique_id': 'tuya.NVjuXIQ6QH9eZLHCzcswitch_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[switch.schuur_socket_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'outlet', + 'friendly_name': 'schuur Socket 1', + }), + 'context': , + 'entity_id': 'switch.schuur_socket_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[switch.seating_side_6_ch_smart_switch_child_lock-entry] EntityRegistryEntrySnapshot({ 'aliases': set({