diff --git a/tests/components/tuya/fixtures/bh_dft4ebatvon3ha5s.json b/tests/components/tuya/fixtures/bh_dft4ebatvon3ha5s.json new file mode 100644 index 000000000000..d792cceae429 --- /dev/null +++ b/tests/components/tuya/fixtures/bh_dft4ebatvon3ha5s.json @@ -0,0 +1,80 @@ +{ + "endpoint": "https://apigw.tuyaeu.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Smart Kettle", + "category": "bh", + "product_id": "dft4ebatvon3ha5s", + "product_name": "Smart Kettle", + "online": true, + "sub": false, + "time_zone": "+02:00", + "active_time": "2025-01-01T00:00:00+00:00", + "create_time": "2025-01-01T00:00:00+00:00", + "update_time": "2025-01-01T00:00:00+00:00", + "function": { + "start": { + "type": "Boolean", + "value": {} + }, + "temp_setting_quick_c": { + "type": "Enum", + "value": { + "range": ["85", "90"] + } + }, + "work_type": { + "type": "Enum", + "value": { + "range": [ + "setting_quick", + "boiling_quick", + "temp_setting", + "temp_boiling" + ] + } + } + }, + "status_range": { + "start": { + "type": "Boolean", + "value": {} + }, + "temp_setting_quick_c": { + "type": "Enum", + "value": { + "range": ["85", "90"] + } + }, + "work_type": { + "type": "Enum", + "value": { + "range": [ + "setting_quick", + "boiling_quick", + "temp_setting", + "temp_boiling" + ] + } + }, + "temp_current": { + "type": "Integer", + "value": { + "unit": "℃", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "start": false, + "temp_setting_quick_c": "85", + "work_type": "setting_quick", + "temp_current": 24 + }, + "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 dc89e97678f4..ea38482f9639 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -7532,6 +7532,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[s5ah3novtabe4tfdhb] + 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', + 's5ah3novtabe4tfdhb', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart Kettle', + 'model_id': 'dft4ebatvon3ha5s', + 'name': 'Smart Kettle', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[sb3zdertrw50bgogkw] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/tuya/snapshots/test_sensor.ambr b/tests/components/tuya/snapshots/test_sensor.ambr index b5777f68b268..4e2b0c675257 100644 --- a/tests/components/tuya/snapshots/test_sensor.ambr +++ b/tests/components/tuya/snapshots/test_sensor.ambr @@ -20209,6 +20209,64 @@ 'state': 'unavailable', }) # --- +# name: test_platform_setup_and_discovery[sensor.smart_kettle_current_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.smart_kettle_current_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current temperature', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current temperature', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'current_temperature', + 'unique_id': 'tuya.s5ah3novtabe4tfdhbtemp_current', + 'unit_of_measurement': , + }) +# --- +# name: test_platform_setup_and_discovery[sensor.smart_kettle_current_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Smart Kettle Current temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.smart_kettle_current_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '24.0', + }) +# --- # name: test_platform_setup_and_discovery[sensor.smart_odor_eliminator_pro_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/tuya/snapshots/test_switch.ambr b/tests/components/tuya/snapshots/test_switch.ambr index 9ff978ab751f..3257df8c3da2 100644 --- a/tests/components/tuya/snapshots/test_switch.ambr +++ b/tests/components/tuya/snapshots/test_switch.ambr @@ -10130,6 +10130,56 @@ 'state': 'off', }) # --- +# name: test_platform_setup_and_discovery[switch.smart_kettle_start-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': 'switch', + 'entity_category': None, + 'entity_id': 'switch.smart_kettle_start', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Start', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Start', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'start', + 'unique_id': 'tuya.s5ah3novtabe4tfdhbstart', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[switch.smart_kettle_start-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Smart Kettle Start', + }), + 'context': , + 'entity_id': 'switch.smart_kettle_start', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[switch.smart_odor_eliminator_pro_switch-entry] EntityRegistryEntrySnapshot({ 'aliases': list([