diff --git a/tests/components/tuya/__init__.py b/tests/components/tuya/__init__.py index 246a4388c766..cea7d633245d 100644 --- a/tests/components/tuya/__init__.py +++ b/tests/components/tuya/__init__.py @@ -13,6 +13,8 @@ from homeassistant.core import HomeAssistant from tests.common import MockConfigEntry DEVICE_MOCKS = [ + "bzyd_45idzfufidgee7ir", # https://github.com/orgs/home-assistant/discussions/717 + "bzyd_ssimhf6r8kgwepfb", # https://github.com/orgs/home-assistant/discussions/718 "cl_3r8gc33pnqsxfe1g", # https://github.com/tuya/tuya-home-assistant/issues/754 "cl_cpbo62rn", # https://github.com/orgs/home-assistant/discussions/539 "cl_ebt12ypvexnixvtf", # https://github.com/tuya/tuya-home-assistant/issues/754 diff --git a/tests/components/tuya/fixtures/bzyd_45idzfufidgee7ir.json b/tests/components/tuya/fixtures/bzyd_45idzfufidgee7ir.json new file mode 100644 index 000000000000..21fc451d392f --- /dev/null +++ b/tests/components/tuya/fixtures/bzyd_45idzfufidgee7ir.json @@ -0,0 +1,137 @@ +{ + "name": "Smart White Noise Machine", + "category": "bzyd", + "product_id": "45idzfufidgee7ir", + "product_name": "Smart White Noise Machine", + "online": true, + "sub": false, + "function": { + "switch": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["scene", "customize_scene", "colour"] + } + }, + "switch_led": { + "type": "Boolean", + "value": {} + }, + "colour_data": { + "type": "Json", + "value": {} + }, + "switch_music": { + "type": "Boolean", + "value": {} + }, + "volume_set": { + "type": "Integer", + "value": { + "unit": "", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "stop": { + "type": "Boolean", + "value": {} + }, + "countdown": { + "type": "Integer", + "value": { + "unit": "min", + "min": 0, + "max": 1440, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "switch": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["scene", "customize_scene", "colour"] + } + }, + "switch_led": { + "type": "Boolean", + "value": {} + }, + "colour_data": { + "type": "String", + "value": {} + }, + "switch_music": { + "type": "Boolean", + "value": {} + }, + "volume_set": { + "type": "Integer", + "value": { + "unit": "", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "stop": { + "type": "Boolean", + "value": {} + }, + "status": { + "type": "Enum", + "value": { + "range": [ + "manual", + "wake_up_1", + "wake_up_2", + "wake_up_3", + "wake_up_4", + "sleep_1", + "sleep_2", + "sleep_3", + "sleep_4" + ] + } + }, + "countdown": { + "type": "Integer", + "value": { + "unit": "min", + "min": 0, + "max": 1440, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "switch": false, + "work_mode": "scene", + "switch_led": true, + "colour_data": { + "h": 240, + "s": 1000, + "v": 1000 + }, + "switch_music": true, + "volume_set": 17, + "stop": false, + "status": "manual", + "countdown": 0 + }, + "set_up": false, + "support_local": true +} diff --git a/tests/components/tuya/fixtures/bzyd_ssimhf6r8kgwepfb.json b/tests/components/tuya/fixtures/bzyd_ssimhf6r8kgwepfb.json new file mode 100644 index 000000000000..8490d115409e --- /dev/null +++ b/tests/components/tuya/fixtures/bzyd_ssimhf6r8kgwepfb.json @@ -0,0 +1,76 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "BlissRadia ", + "category": "bzyd", + "product_id": "ssimhf6r8kgwepfb", + "product_name": "BlissRadia ", + "online": true, + "sub": false, + "time_zone": "-04:00", + "active_time": "2025-08-19T14:01:37+00:00", + "create_time": "2025-08-19T14:01:37+00:00", + "update_time": "2025-08-19T14:01:37+00:00", + "function": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "volume_set": { + "type": "Integer", + "value": { + "unit": "", + "min": 5, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "snooze": { + "type": "Boolean", + "value": {} + }, + "colour_data": { + "type": "Json", + "value": {} + } + }, + "status_range": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "volume_set": { + "type": "Integer", + "value": { + "unit": "", + "min": 5, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "snooze": { + "type": "Boolean", + "value": {} + }, + "colour_data": { + "type": "String", + "value": {} + } + }, + "status": { + "switch_led": false, + "volume_set": 5, + "snooze": false, + "colour_data": { + "h": 0, + "s": 900, + "v": 1000 + } + }, + "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 5eb43abd365f..62e849a5509b 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -1673,6 +1673,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[bfpewgk8r6fhmissdyzb] + 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', + 'bfpewgk8r6fhmissdyzb', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'BlissRadia (unsupported)', + 'model_id': 'ssimhf6r8kgwepfb', + 'name': 'BlissRadia ', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[bgnj6bafrdgb1xmajd] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -4711,6 +4742,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[ri7eegdifufzdi54dyzb] + 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', + 'ri7eegdifufzdi54dyzb', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart White Noise Machine (unsupported)', + 'model_id': '45idzfufidgee7ir', + 'name': 'Smart White Noise Machine', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[rl39uwgaqwjwc] DeviceRegistryEntrySnapshot({ 'area_id': None,