diff --git a/tests/components/tuya/fixtures/sfkzq_kcdiut0eqeni7b8n.json b/tests/components/tuya/fixtures/sfkzq_kcdiut0eqeni7b8n.json new file mode 100644 index 000000000000..c82164a3f2a1 --- /dev/null +++ b/tests/components/tuya/fixtures/sfkzq_kcdiut0eqeni7b8n.json @@ -0,0 +1,132 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Smart Water Valve BV05", + "category": "sfkzq", + "product_id": "kcdiut0eqeni7b8n", + "product_name": "Smart Water Valve BV05", + "online": true, + "sub": false, + "time_zone": "+01:00", + "active_time": "2025-03-23T16:37:28+00:00", + "create_time": "2025-03-23T16:37:28+00:00", + "update_time": "2025-03-23T16:37:28+00:00", + "function": { + "switch": { + "type": "Boolean", + "value": {} + }, + "percent_control": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 10 + } + }, + "weather_delay": { + "type": "Enum", + "value": { + "range": ["cancel", "24h", "48h", "72h"] + } + }, + "countdown": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "switch": { + "type": "Boolean", + "value": {} + }, + "percent_control": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 10 + } + }, + "percent_state": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "water_once": { + "type": "Integer", + "value": { + "unit": "L", + "min": 0, + "max": 10000, + "scale": 1, + "step": 1 + } + }, + "water_total": { + "type": "Integer", + "value": { + "unit": "L", + "min": 0, + "max": 999999999, + "scale": 0, + "step": 1 + } + }, + "weather_delay": { + "type": "Enum", + "value": { + "range": ["cancel", "24h", "48h", "72h"] + } + }, + "countdown": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "sensor_temperature": { + "type": "Integer", + "value": { + "unit": "℃", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "switch": true, + "percent_control": 20, + "percent_state": 20, + "water_once": 10000, + "water_total": 78841, + "weather_delay": "cancel", + "countdown": 0, + "sensor_temperature": 25 + }, + "set_up": true, + "support_local": true +} diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index a4d2cea87e8e..73e20d98523c 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -5849,6 +5849,36 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[n8b7ineqe0tuidckqzkfs] + 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', + 'n8b7ineqe0tuidckqzkfs', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart Water Valve BV05', + 'model_id': 'kcdiut0eqeni7b8n', + 'name': 'Smart Water Valve BV05', + 'name_by_user': None, + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[nc4e9nlZPTuTNfYEzc] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/tuya/snapshots/test_number.ambr b/tests/components/tuya/snapshots/test_number.ambr index 2ab761a8cb3d..f3294c5282a8 100644 --- a/tests/components/tuya/snapshots/test_number.ambr +++ b/tests/components/tuya/snapshots/test_number.ambr @@ -3210,6 +3210,67 @@ 'state': 'unavailable', }) # --- +# name: test_platform_setup_and_discovery[number.smart_water_valve_bv05_irrigation_duration-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : 86400.0, + : 0.0, + : , + : 1.0, + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'number', + 'entity_category': , + 'entity_id': 'number.smart_water_valve_bv05_irrigation_duration', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Irrigation duration', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Irrigation duration', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'irrigation_duration', + 'unique_id': 'tuya.n8b7ineqe0tuidckqzkfscountdown', + 'unit_of_measurement': 's', + }) +# --- +# name: test_platform_setup_and_discovery[number.smart_water_valve_bv05_irrigation_duration-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'duration', + : 'Smart Water Valve BV05 Irrigation duration', + : 86400.0, + : 0.0, + : , + : 1.0, + : 's', + }), + 'context': , + 'entity_id': 'number.smart_water_valve_bv05_irrigation_duration', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- # name: test_platform_setup_and_discovery[number.smart_white_noise_machine_volume-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/tuya/snapshots/test_select.ambr b/tests/components/tuya/snapshots/test_select.ambr index 52cc3d2f35cd..9b3f85a7c78c 100644 --- a/tests/components/tuya/snapshots/test_select.ambr +++ b/tests/components/tuya/snapshots/test_select.ambr @@ -6131,6 +6131,69 @@ 'state': 'unavailable', }) # --- +# name: test_platform_setup_and_discovery[select.smart_water_valve_bv05_weather_delay-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : list([ + 'cancel', + '24h', + '48h', + '72h', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.smart_water_valve_bv05_weather_delay', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Weather delay', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Weather delay', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'weather_delay', + 'unique_id': 'tuya.n8b7ineqe0tuidckqzkfsweather_delay', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[select.smart_water_valve_bv05_weather_delay-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'Smart Water Valve BV05 Weather delay', + : list([ + 'cancel', + '24h', + '48h', + '72h', + ]), + }), + 'context': , + 'entity_id': 'select.smart_water_valve_bv05_weather_delay', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'cancel', + }) +# --- # name: test_platform_setup_and_discovery[select.socket3_power_on_behavior-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/tuya/snapshots/test_valve.ambr b/tests/components/tuya/snapshots/test_valve.ambr index 74bedd56a9f3..e8188d65591a 100644 --- a/tests/components/tuya/snapshots/test_valve.ambr +++ b/tests/components/tuya/snapshots/test_valve.ambr @@ -581,6 +581,59 @@ 'state': 'unavailable', }) # --- +# name: test_platform_setup_and_discovery[valve.smart_water_valve_bv05_valve-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'valve', + 'entity_category': None, + 'entity_id': 'valve.smart_water_valve_bv05_valve', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Valve', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Valve', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': 'valve', + 'unique_id': 'tuya.n8b7ineqe0tuidckqzkfsswitch', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[valve.smart_water_valve_bv05_valve-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'water', + : 'Smart Water Valve BV05 Valve', + : False, + : , + }), + 'context': , + 'entity_id': 'valve.smart_water_valve_bv05_valve', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'open', + }) +# --- # name: test_platform_setup_and_discovery[valve.sprinkler_cesare_valve-entry] EntityRegistryEntrySnapshot({ 'aliases': list([