mirror of
https://github.com/home-assistant/core.git
synced 2026-04-27 05:28:17 +00:00
Add Tuya snapshots tests for kt category (air conditioner) (#150256)
This commit is contained in:
@@ -294,6 +294,14 @@ DEVICE_MOCKS = {
|
||||
# https://github.com/home-assistant/core/pull/148646
|
||||
Platform.CLIMATE,
|
||||
],
|
||||
"kt_ibmmirhhq62mmf1g": [
|
||||
# https://github.com/home-assistant/core/pull/150077
|
||||
Platform.CLIMATE,
|
||||
],
|
||||
"kt_vdadlnmsorlhw4td": [
|
||||
# https://github.com/home-assistant/core/pull/149635
|
||||
Platform.CLIMATE,
|
||||
],
|
||||
"ldcg_9kbbfeho": [
|
||||
# https://github.com/orgs/home-assistant/discussions/482
|
||||
Platform.SENSOR,
|
||||
|
||||
110
tests/components/tuya/fixtures/kt_ibmmirhhq62mmf1g.json
Normal file
110
tests/components/tuya/fixtures/kt_ibmmirhhq62mmf1g.json
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"endpoint": "https://apigw.tuyaus.com",
|
||||
"mqtt_connected": true,
|
||||
"disabled_by": null,
|
||||
"disabled_polling": false,
|
||||
"name": "Master Bedroom AC",
|
||||
"category": "kt",
|
||||
"product_id": "ibmmirhhq62mmf1g",
|
||||
"product_name": "T platform model-USB ",
|
||||
"online": true,
|
||||
"sub": false,
|
||||
"time_zone": "-07:00",
|
||||
"active_time": "2025-07-16T14:12:18+00:00",
|
||||
"create_time": "2025-07-16T14:12:18+00:00",
|
||||
"update_time": "2025-07-16T14:12:18+00:00",
|
||||
"function": {
|
||||
"switch": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"temp_set": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": 160,
|
||||
"max": 880,
|
||||
"scale": 1,
|
||||
"step": 5
|
||||
}
|
||||
},
|
||||
"mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["cold", "hot", "wet", "wind", "auto"]
|
||||
}
|
||||
},
|
||||
"temp_set_f": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2109",
|
||||
"min": 61,
|
||||
"max": 88,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"status_range": {
|
||||
"switch": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"temp_set": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": 160,
|
||||
"max": 880,
|
||||
"scale": 1,
|
||||
"step": 5
|
||||
}
|
||||
},
|
||||
"temp_current": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": -20,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"mode": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["cold", "hot", "wet", "wind", "auto"]
|
||||
}
|
||||
},
|
||||
"humidity_current": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "%",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"temp_set_f": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2109",
|
||||
"min": 61,
|
||||
"max": 88,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"switch": true,
|
||||
"temp_set": 750,
|
||||
"temp_current": 26,
|
||||
"mode": "cold",
|
||||
"humidity_current": 0,
|
||||
"temp_set_f": 61
|
||||
},
|
||||
"set_up": true,
|
||||
"support_local": true
|
||||
}
|
||||
78
tests/components/tuya/fixtures/kt_vdadlnmsorlhw4td.json
Normal file
78
tests/components/tuya/fixtures/kt_vdadlnmsorlhw4td.json
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"endpoint": "https://apigw.tuyaeu.com",
|
||||
"mqtt_connected": true,
|
||||
"disabled_by": null,
|
||||
"disabled_polling": false,
|
||||
"name": "Sove",
|
||||
"category": "kt",
|
||||
"product_id": "vdadlnmsorlhw4td",
|
||||
"product_name": "YFA-05C",
|
||||
"online": true,
|
||||
"sub": false,
|
||||
"time_zone": "+02:00",
|
||||
"active_time": "2025-07-07T11:44:00+00:00",
|
||||
"create_time": "2025-07-07T11:44:00+00:00",
|
||||
"update_time": "2025-07-07T11:44:00+00:00",
|
||||
"function": {
|
||||
"switch": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"temp_set": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": 16,
|
||||
"max": 86,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"windspeed": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["1", "2"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"status_range": {
|
||||
"switch": {
|
||||
"type": "Boolean",
|
||||
"value": {}
|
||||
},
|
||||
"temp_set": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": 16,
|
||||
"max": 86,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"temp_current": {
|
||||
"type": "Integer",
|
||||
"value": {
|
||||
"unit": "\u2103",
|
||||
"min": -7,
|
||||
"max": 110,
|
||||
"scale": 0,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
"windspeed": {
|
||||
"type": "Enum",
|
||||
"value": {
|
||||
"range": ["1", "2"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"switch": false,
|
||||
"temp_set": 16,
|
||||
"temp_current": 24,
|
||||
"windspeed": 2
|
||||
},
|
||||
"set_up": true,
|
||||
"support_local": true
|
||||
}
|
||||
@@ -230,6 +230,81 @@
|
||||
'state': 'heat_cool',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[climate.master_bedroom_ac-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'hvac_modes': list([
|
||||
<HVACMode.OFF: 'off'>,
|
||||
<HVACMode.COOL: 'cool'>,
|
||||
<HVACMode.HEAT: 'heat'>,
|
||||
<HVACMode.DRY: 'dry'>,
|
||||
<HVACMode.FAN_ONLY: 'fan_only'>,
|
||||
<HVACMode.HEAT_COOL: 'heat_cool'>,
|
||||
]),
|
||||
'max_temp': 88.0,
|
||||
'min_temp': 16.0,
|
||||
'target_temp_step': 0.5,
|
||||
}),
|
||||
'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.master_bedroom_ac',
|
||||
'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.g1fmm26qhhrimmbitk',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[climate.master_bedroom_ac-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'current_humidity': 0,
|
||||
'current_temperature': 26.0,
|
||||
'friendly_name': 'Master Bedroom AC',
|
||||
'hvac_modes': list([
|
||||
<HVACMode.OFF: 'off'>,
|
||||
<HVACMode.COOL: 'cool'>,
|
||||
<HVACMode.HEAT: 'heat'>,
|
||||
<HVACMode.DRY: 'dry'>,
|
||||
<HVACMode.FAN_ONLY: 'fan_only'>,
|
||||
<HVACMode.HEAT_COOL: 'heat_cool'>,
|
||||
]),
|
||||
'max_temp': 88.0,
|
||||
'min_temp': 16.0,
|
||||
'supported_features': <ClimateEntityFeature: 385>,
|
||||
'target_temp_step': 0.5,
|
||||
'temperature': 75.0,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'climate.master_bedroom_ac',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'cool',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[climate.smart_thermostats-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
@@ -298,6 +373,81 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[climate.sove-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'fan_modes': list([
|
||||
'1',
|
||||
'2',
|
||||
]),
|
||||
'hvac_modes': list([
|
||||
<HVACMode.OFF: 'off'>,
|
||||
<HVACMode.COOL: 'cool'>,
|
||||
]),
|
||||
'max_temp': 86.0,
|
||||
'min_temp': 16.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.sove',
|
||||
'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: 393>,
|
||||
'translation_key': None,
|
||||
'unique_id': 'tuya.dt4whlrosmnldadvtk',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[climate.sove-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'current_temperature': 24.0,
|
||||
'fan_mode': 2,
|
||||
'fan_modes': list([
|
||||
'1',
|
||||
'2',
|
||||
]),
|
||||
'friendly_name': 'Sove',
|
||||
'hvac_modes': list([
|
||||
<HVACMode.OFF: 'off'>,
|
||||
<HVACMode.COOL: 'cool'>,
|
||||
]),
|
||||
'max_temp': 86.0,
|
||||
'min_temp': 16.0,
|
||||
'supported_features': <ClimateEntityFeature: 393>,
|
||||
'target_temp_step': 1.0,
|
||||
'temperature': 16.0,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'climate.sove',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[climate.term_prizemi-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
||||
Reference in New Issue
Block a user