diff --git a/tests/components/tuya/fixtures/dgnbj_layxxij0sdbrfmrf.json b/tests/components/tuya/fixtures/dgnbj_layxxij0sdbrfmrf.json new file mode 100644 index 00000000000..9e2905d0148 --- /dev/null +++ b/tests/components/tuya/fixtures/dgnbj_layxxij0sdbrfmrf.json @@ -0,0 +1,508 @@ +{ + "endpoint": "https://openapi.tuyaeu.com", + "auth_type": 0, + "country_code": "39", + "app_type": "smartlife", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "WiFi smart online 8 in 1 tester", + "model": "", + "category": "dgnbj", + "product_id": "layxxij0sdbrfmrf", + "product_name": "WiFi smart online 8 in 1 tester", + "online": false, + "sub": false, + "time_zone": "+01:00", + "active_time": "2023-01-29T09:08:53+00:00", + "create_time": "2023-01-29T09:08:53+00:00", + "update_time": "2023-12-01T06:51:49+00:00", + "function": { + "temp_warn_max": { + "type": "Integer", + "value": { + "unit": " \u2103", + "min": -100, + "max": 1100, + "scale": 1, + "step": 1 + } + }, + "temp_warn_min": { + "type": "Integer", + "value": { + "unit": " \u2103", + "min": -100, + "max": 1100, + "scale": 1, + "step": 1 + } + }, + "ph_warn_max": { + "type": "Integer", + "value": { + "unit": "ph", + "min": 0, + "max": 1500, + "scale": 2, + "step": 1 + } + }, + "ph_warn_min": { + "type": "Integer", + "value": { + "unit": "ph", + "min": 0, + "max": 1500, + "scale": 2, + "step": 1 + } + }, + "tds_warn_max": { + "type": "Integer", + "value": { + "unit": "PPM", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "tds_warn_min": { + "type": "Integer", + "value": { + "unit": "PPM", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "ec_warn_max": { + "type": "Integer", + "value": { + "unit": "us", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "ec_warn_min": { + "type": "Integer", + "value": { + "unit": "us", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "salinity_warn_max": { + "type": "Integer", + "value": { + "unit": "ppm", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "salinity_warn_min": { + "type": "Integer", + "value": { + "unit": "ppm", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "pro_warn_max": { + "type": "Integer", + "value": { + "unit": " S.G", + "min": 500, + "max": 2000, + "scale": 3, + "step": 1 + } + }, + "pro_warn_min": { + "type": "Integer", + "value": { + "unit": " S.G", + "min": 500, + "max": 2000, + "scale": 3, + "step": 1 + } + }, + "orp_warn_max": { + "type": "Integer", + "value": { + "unit": "mV", + "min": -2000, + "max": 2000, + "scale": 0, + "step": 1 + } + }, + "orp_warn_min": { + "type": "Integer", + "value": { + "unit": "mV", + "min": -2000, + "max": 2000, + "scale": 0, + "step": 1 + } + }, + "cf_warn_max": { + "type": "Integer", + "value": { + "unit": "CF", + "min": 0, + "max": 199999, + "scale": 2, + "step": 1 + } + }, + "cf_warn_min": { + "type": "Integer", + "value": { + "unit": "CF", + "min": 1, + "max": 199999, + "scale": 2, + "step": 1 + } + }, + "rh_warn_max": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "rh_warn_min": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "temp_current": { + "type": "Integer", + "value": { + "unit": "\u2103", + "min": -100, + "max": 1100, + "scale": 1, + "step": 1 + } + }, + "sensor_list": { + "type": "Raw", + "value": {} + }, + "temp_warn_max": { + "type": "Integer", + "value": { + "unit": " \u2103", + "min": -100, + "max": 1100, + "scale": 1, + "step": 1 + } + }, + "temp_warn_min": { + "type": "Integer", + "value": { + "unit": " \u2103", + "min": -100, + "max": 1100, + "scale": 1, + "step": 1 + } + }, + "ph_current": { + "type": "Integer", + "value": { + "unit": "ph", + "min": 0, + "max": 1500, + "scale": 2, + "step": 1 + } + }, + "ph_warn_max": { + "type": "Integer", + "value": { + "unit": "ph", + "min": 0, + "max": 1500, + "scale": 2, + "step": 1 + } + }, + "ph_warn_min": { + "type": "Integer", + "value": { + "unit": "ph", + "min": 0, + "max": 1500, + "scale": 2, + "step": 1 + } + }, + "tds_current": { + "type": "Integer", + "value": { + "unit": "ms/cm", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "tds_warn_max": { + "type": "Integer", + "value": { + "unit": "PPM", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "tds_warn_min": { + "type": "Integer", + "value": { + "unit": "PPM", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "ec_current": { + "type": "Integer", + "value": { + "unit": "us", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "ec_warn_max": { + "type": "Integer", + "value": { + "unit": "us", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "ec_warn_min": { + "type": "Integer", + "value": { + "unit": "us", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "salinity_current": { + "type": "Integer", + "value": { + "unit": "PPM", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "salinity_warn_max": { + "type": "Integer", + "value": { + "unit": "ppm", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "salinity_warn_min": { + "type": "Integer", + "value": { + "unit": "ppm", + "min": 0, + "max": 199999, + "scale": 0, + "step": 1 + } + }, + "pro_current": { + "type": "Integer", + "value": { + "unit": " S.G", + "min": 500, + "max": 2000, + "scale": 3, + "step": 1 + } + }, + "pro_warn_max": { + "type": "Integer", + "value": { + "unit": " S.G", + "min": 500, + "max": 2000, + "scale": 3, + "step": 1 + } + }, + "pro_warn_min": { + "type": "Integer", + "value": { + "unit": " S.G", + "min": 500, + "max": 2000, + "scale": 3, + "step": 1 + } + }, + "orp_current": { + "type": "Integer", + "value": { + "unit": "mV", + "min": -2000, + "max": 2000, + "scale": 0, + "step": 1 + } + }, + "orp_warn_max": { + "type": "Integer", + "value": { + "unit": "mV", + "min": -2000, + "max": 2000, + "scale": 0, + "step": 1 + } + }, + "orp_warn_min": { + "type": "Integer", + "value": { + "unit": "mV", + "min": -2000, + "max": 2000, + "scale": 0, + "step": 1 + } + }, + "cf_current": { + "type": "Integer", + "value": { + "unit": "CF", + "min": 0, + "max": 199999, + "scale": 2, + "step": 1 + } + }, + "cf_warn_max": { + "type": "Integer", + "value": { + "unit": "CF", + "min": 0, + "max": 199999, + "scale": 2, + "step": 1 + } + }, + "cf_warn_min": { + "type": "Integer", + "value": { + "unit": "CF", + "min": 1, + "max": 199999, + "scale": 2, + "step": 1 + } + }, + "rh_current": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "rh_warn_max": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "rh_warn_min": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "temp_current": 266, + "sensor_list": "AQEBAQEBAQEA", + "temp_warn_max": 0, + "temp_warn_min": 0, + "ph_current": 818, + "ph_warn_max": 0, + "ph_warn_min": 0, + "tds_current": 25400, + "tds_warn_max": 0, + "tds_warn_min": 0, + "ec_current": 50800, + "ec_warn_max": 0, + "ec_warn_min": 0, + "salinity_current": 29633, + "salinity_warn_max": 0, + "salinity_warn_min": 0, + "pro_current": 1027, + "pro_warn_max": 500, + "pro_warn_min": 500, + "orp_current": 236, + "orp_warn_max": 0, + "orp_warn_min": 0, + "cf_current": 50800, + "cf_warn_max": 0, + "cf_warn_min": 1, + "rh_current": 0, + "rh_warn_max": 0, + "rh_warn_min": 0 + } +} diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index 566552d239c..f70cb73d1d6 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -3626,6 +3626,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[frmfrbds0jixxyaljbngd] + 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', + 'frmfrbds0jixxyaljbngd', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'WiFi smart online 8 in 1 tester', + 'model_id': 'layxxij0sdbrfmrf', + 'name': 'WiFi smart online 8 in 1 tester', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[ftvxinxevpy21tbelc] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/tuya/snapshots/test_sensor.ambr b/tests/components/tuya/snapshots/test_sensor.ambr index f11ece5895f..246e74dd7d0 100644 --- a/tests/components/tuya/snapshots/test_sensor.ambr +++ b/tests/components/tuya/snapshots/test_sensor.ambr @@ -24384,6 +24384,64 @@ 'state': '100.0', }) # --- +# name: test_platform_setup_and_discovery[sensor.wifi_smart_online_8_in_1_tester_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.wifi_smart_online_8_in_1_tester_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Temperature', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'temperature', + 'unique_id': 'tuya.frmfrbds0jixxyaljbngdtemp_current', + 'unit_of_measurement': , + }) +# --- +# name: test_platform_setup_and_discovery[sensor.wifi_smart_online_8_in_1_tester_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'WiFi smart online 8 in 1 tester Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.wifi_smart_online_8_in_1_tester_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_platform_setup_and_discovery[sensor.wifi_smoke_alarm_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([