Add Tuya test fixtures for bzyd category (#150923)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
Billy Rowell
2025-08-22 08:57:16 +02:00
committed by GitHub
co-authored by epenet
parent e16eff6f28
commit f6bb32c44b
4 changed files with 277 additions and 0 deletions
+2
View File
@@ -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
@@ -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
}
@@ -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
}
@@ -1673,6 +1673,37 @@
'via_device_id': None,
})
# ---
# name: test_device_registry[bfpewgk8r6fhmissdyzb]
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': None,
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'tuya',
'bfpewgk8r6fhmissdyzb',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'BlissRadia (unsupported)',
'model_id': 'ssimhf6r8kgwepfb',
'name': 'BlissRadia ',
'name_by_user': None,
'primary_config_entry': <ANY>,
'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': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': None,
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'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': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[rl39uwgaqwjwc]
DeviceRegistryEntrySnapshot({
'area_id': None,