mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Add snapshots for Tuya air conditioner
This commit is contained in:
parent
f5d68a4ea4
commit
d6bff7dcaf
@ -148,6 +148,11 @@ DEVICE_MOCKS = {
|
||||
Platform.SELECT,
|
||||
Platform.SWITCH,
|
||||
],
|
||||
"wk_air_conditioner": [
|
||||
# https://github.com/home-assistant/core/issues/146263
|
||||
Platform.CLIMATE,
|
||||
Platform.SWITCH,
|
||||
],
|
||||
"wk_wifi_smart_gas_boiler_thermostat": [
|
||||
# https://github.com/orgs/home-assistant/discussions/243
|
||||
Platform.CLIMATE,
|
||||
|
102
tests/components/tuya/fixtures/wk_air_conditioner.json
Normal file
102
tests/components/tuya/fixtures/wk_air_conditioner.json
Normal file
@ -0,0 +1,102 @@
|
||||
{
|
||||
"endpoint": "https://apigw.tuyaeu.com",
|
||||
"terminal_id": "1749538552551GHfV17",
|
||||
"mqtt_connected": true,
|
||||
"disabled_by": null,
|
||||
"disabled_polling": false,
|
||||
"id": "bf6fc1645146455a2efrex",
|
||||
"name": "Clima cucina",
|
||||
"category": "wk",
|
||||
"product_id": "aqoouq7x",
|
||||
"product_name": "T7-Air conditioner thermostat\uff08ZIGBEE)",
|
||||
"online": true,
|
||||
"sub": true,
|
||||
"time_zone": "+02:00",
|
||||
"active_time": "2025-04-21T13:39:47+00:00",
|
||||
"create_time": "2025-04-21T13:39:47+00:00",
|
||||
"update_time": "2025-04-21T13:39:47+00:00",
|
||||
"function": {
|
||||
"switch": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["cold", "hot"]
|
||||
}
|
||||
},
|
||||
"temp_set": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": 5,
|
||||
"max": 35,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"level": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["low", "middle", "high", "auto"]
|
||||
}
|
||||
},
|
||||
"child_lock": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
}
|
||||
},
|
||||
"status_range": {
|
||||
"switch": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["cold", "hot"]
|
||||
}
|
||||
},
|
||||
"temp_set": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": 5,
|
||||
"max": 35,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"temp_current": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": 0,
|
||||
"max": 50,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"level": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["low", "middle", "high", "auto"]
|
||||
}
|
||||
},
|
||||
"child_lock": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"switch": false,
|
||||
"mode": "cold",
|
||||
"temp_set": 25,
|
||||
"temp_current": 27,
|
||||
"level": "auto",
|
||||
"child_lock": false
|
||||
},
|
||||
"set_up": true,
|
||||
"support_local": true
|
||||
}
|
@ -74,6 +74,74 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[wk_air_conditioner][climate.clima_cucina-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'hvac_modes': list([
|
||||
<HVACMode.OFF: 'off'>,
|
||||
<HVACMode.COOL: 'cool'>,
|
||||
<HVACMode.HEAT: 'heat'>,
|
||||
]),
|
||||
'max_temp': 35.0,
|
||||
'min_temp': 5.0,
|
||||
'target_temp_step': 1.0,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'climate',
|
||||
'entity_category': None,
|
||||
'entity_id': 'climate.clima_cucina',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': None,
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': <ClimateEntityFeature: 385>,
|
||||
'translation_key': None,
|
||||
'unique_id': 'tuya.bf6fc1645146455a2efrex',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[wk_air_conditioner][climate.clima_cucina-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'current_temperature': 27.0,
|
||||
'friendly_name': 'Clima cucina',
|
||||
'hvac_modes': list([
|
||||
<HVACMode.OFF: 'off'>,
|
||||
<HVACMode.COOL: 'cool'>,
|
||||
<HVACMode.HEAT: 'heat'>,
|
||||
]),
|
||||
'max_temp': 35.0,
|
||||
'min_temp': 5.0,
|
||||
'supported_features': <ClimateEntityFeature: 385>,
|
||||
'target_temp_step': 1.0,
|
||||
'temperature': 25.0,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'climate.clima_cucina',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[wk_wifi_smart_gas_boiler_thermostat][climate.wifi_smart_gas_boiler_thermostat-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
@ -1161,6 +1161,54 @@
|
||||
'state': 'unavailable',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[wk_air_conditioner][switch.clima_cucina_child_lock-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.clima_cucina_child_lock',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Child lock',
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'child_lock',
|
||||
'unique_id': 'tuya.bf6fc1645146455a2efrexchild_lock',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[wk_air_conditioner][switch.clima_cucina_child_lock-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Clima cucina Child lock',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.clima_cucina_child_lock',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[wk_wifi_smart_gas_boiler_thermostat][switch.wifi_smart_gas_boiler_thermostat_child_lock-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
Loading…
x
Reference in New Issue
Block a user