1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 08:26:41 +01:00

Add test fixture for Tuya WiFi smart online 8 in 1 tester (#166003)

This commit is contained in:
epenet
2026-03-19 13:27:42 +01:00
committed by GitHub
parent abca80dc13
commit b152f2f9a6
3 changed files with 597 additions and 0 deletions

View File

@@ -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
}
}

View File

@@ -3626,6 +3626,37 @@
'via_device_id': None,
})
# ---
# name: test_device_registry[frmfrbds0jixxyaljbngd]
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',
'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': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[ftvxinxevpy21tbelc]
DeviceRegistryEntrySnapshot({
'area_id': None,

View File

@@ -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': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Temperature',
'options': dict({
'sensor': dict({
'suggested_display_precision': 1,
}),
}),
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
'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': <UnitOfTemperature.CELSIUS: '°C'>,
})
# ---
# 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': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
}),
'context': <ANY>,
'entity_id': 'sensor.wifi_smart_online_8_in_1_tester_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unavailable',
})
# ---
# name: test_platform_setup_and_discovery[sensor.wifi_smoke_alarm_battery-entry]
EntityRegistryEntrySnapshot({
'aliases': list([