mirror of
https://github.com/home-assistant/core.git
synced 2026-09-27 01:46:11 -04:00
Add Tuya sfkzq water valve test fixture (#182169)
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -5849,6 +5849,36 @@
|
||||
'via_device_id': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_device_registry[n8b7ineqe0tuidckqzkfs]
|
||||
DeviceRegistryEntrySnapshot({
|
||||
'area_id': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'configuration_url': None,
|
||||
'connections': set({
|
||||
}),
|
||||
'disabled_by': None,
|
||||
'entry_type': None,
|
||||
'hw_version': None,
|
||||
'id': <ANY>,
|
||||
'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,
|
||||
|
||||
@@ -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({
|
||||
<NumberEntityCapabilityAttribute.MAX: 'max'>: 86400.0,
|
||||
<NumberEntityCapabilityAttribute.MIN: 'min'>: 0.0,
|
||||
<NumberEntityCapabilityAttribute.MODE: 'mode'>: <NumberMode.AUTO: 'auto'>,
|
||||
<NumberEntityCapabilityAttribute.STEP: 'step'>: 1.0,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.smart_water_valve_bv05_irrigation_duration',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': 'Irrigation duration',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <NumberDeviceClass.DURATION: 'duration'>,
|
||||
'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({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'duration',
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Smart Water Valve BV05 Irrigation duration',
|
||||
<NumberEntityCapabilityAttribute.MAX: 'max'>: 86400.0,
|
||||
<NumberEntityCapabilityAttribute.MIN: 'min'>: 0.0,
|
||||
<NumberEntityCapabilityAttribute.MODE: 'mode'>: <NumberMode.AUTO: 'auto'>,
|
||||
<NumberEntityCapabilityAttribute.STEP: 'step'>: 1.0,
|
||||
<EntityStateAttribute.UNIT_OF_MEASUREMENT: 'unit_of_measurement'>: 's',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'number.smart_water_valve_bv05_irrigation_duration',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[number.smart_white_noise_machine_volume-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
|
||||
@@ -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({
|
||||
<SelectEntityCapabilityAttribute.OPTIONS: 'options'>: list([
|
||||
'cancel',
|
||||
'24h',
|
||||
'48h',
|
||||
'72h',
|
||||
]),
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'select',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'select.smart_water_valve_bv05_weather_delay',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'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({
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Smart Water Valve BV05 Weather delay',
|
||||
<SelectEntityCapabilityAttribute.OPTIONS: 'options'>: list([
|
||||
'cancel',
|
||||
'24h',
|
||||
'48h',
|
||||
'72h',
|
||||
]),
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'select.smart_water_valve_bv05_weather_delay',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'cancel',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[select.socket3_power_on_behavior-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
|
||||
@@ -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': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'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': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': 'Valve',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <ValveDeviceClass.WATER: 'water'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Valve',
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': <ValveEntityFeature: 3>,
|
||||
'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({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'water',
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Smart Water Valve BV05 Valve',
|
||||
<ValveEntityStateAttribute.IS_CLOSED: 'is_closed'>: False,
|
||||
<EntityStateAttribute.SUPPORTED_FEATURES: 'supported_features'>: <ValveEntityFeature: 3>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'valve.smart_water_valve_bv05_valve',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'open',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[valve.sprinkler_cesare_valve-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
|
||||
Reference in New Issue
Block a user