mirror of
https://github.com/home-assistant/core.git
synced 2025-09-04 20:31:36 +02:00
Add Tuya snapshots tests for cl category (curtains) (#150167)
This commit is contained in:
@@ -14,6 +14,25 @@ from homeassistant.core import HomeAssistant
|
|||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
|
|
||||||
DEVICE_MOCKS = {
|
DEVICE_MOCKS = {
|
||||||
|
"cl_3r8gc33pnqsxfe1g": [
|
||||||
|
# https://github.com/tuya/tuya-home-assistant/issues/754
|
||||||
|
Platform.COVER,
|
||||||
|
Platform.SENSOR,
|
||||||
|
Platform.SWITCH,
|
||||||
|
],
|
||||||
|
"cl_cpbo62rn": [
|
||||||
|
# https://github.com/orgs/home-assistant/discussions/539
|
||||||
|
Platform.COVER,
|
||||||
|
Platform.SELECT,
|
||||||
|
],
|
||||||
|
"cl_ebt12ypvexnixvtf": [
|
||||||
|
# https://github.com/tuya/tuya-home-assistant/issues/754
|
||||||
|
Platform.COVER,
|
||||||
|
],
|
||||||
|
"cl_qqdxfdht": [
|
||||||
|
# https://github.com/orgs/home-assistant/discussions/539
|
||||||
|
Platform.COVER,
|
||||||
|
],
|
||||||
"cl_zah67ekd": [
|
"cl_zah67ekd": [
|
||||||
# https://github.com/home-assistant/core/issues/71242
|
# https://github.com/home-assistant/core/issues/71242
|
||||||
Platform.COVER,
|
Platform.COVER,
|
||||||
|
123
tests/components/tuya/fixtures/cl_3r8gc33pnqsxfe1g.json
Normal file
123
tests/components/tuya/fixtures/cl_3r8gc33pnqsxfe1g.json
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
{
|
||||||
|
"endpoint": "https://openapi.tuyaeu.com",
|
||||||
|
"auth_type": 0,
|
||||||
|
"country_code": "61",
|
||||||
|
"app_type": "smartlife",
|
||||||
|
"mqtt_connected": true,
|
||||||
|
"disabled_by": null,
|
||||||
|
"disabled_polling": false,
|
||||||
|
"name": "Lounge Dark Blind",
|
||||||
|
"model": null,
|
||||||
|
"category": "cl",
|
||||||
|
"product_id": "3r8gc33pnqsxfe1g",
|
||||||
|
"product_name": "Blinds Controller",
|
||||||
|
"online": true,
|
||||||
|
"sub": false,
|
||||||
|
"time_zone": "+10:00",
|
||||||
|
"active_time": "2022-01-01T20:55:54+00:00",
|
||||||
|
"create_time": "2021-07-26T15:33:42+00:00",
|
||||||
|
"update_time": "2022-02-12T10:40:15+00:00",
|
||||||
|
"function": {
|
||||||
|
"control": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["open", "stop", "close"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"control_back": {
|
||||||
|
"type": "Boolean",
|
||||||
|
"value": {}
|
||||||
|
},
|
||||||
|
"countdown": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["cancel", "1", "2", "3", "4"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status_range": {
|
||||||
|
"control": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["open", "stop", "close"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_state": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"control_back": {
|
||||||
|
"type": "Boolean",
|
||||||
|
"value": {}
|
||||||
|
},
|
||||||
|
"work_state": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["opening", "closing"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"countdown": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["cancel", "1", "2", "3", "4"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"countdown_left": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "s",
|
||||||
|
"min": 0,
|
||||||
|
"max": 86400,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"time_total": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "ms",
|
||||||
|
"min": 0,
|
||||||
|
"max": 120000,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"control": "open",
|
||||||
|
"percent_control": 0,
|
||||||
|
"percent_state": 0,
|
||||||
|
"control_back": true,
|
||||||
|
"work_state": "opening",
|
||||||
|
"countdown": "cancel",
|
||||||
|
"countdown_left": 0,
|
||||||
|
"time_total": 25400
|
||||||
|
},
|
||||||
|
"terminal_id": "REDACTED"
|
||||||
|
}
|
102
tests/components/tuya/fixtures/cl_cpbo62rn.json
Normal file
102
tests/components/tuya/fixtures/cl_cpbo62rn.json
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
{
|
||||||
|
"endpoint": "https://apigw.tuyaeu.com",
|
||||||
|
"terminal_id": "REDACTED",
|
||||||
|
"mqtt_connected": true,
|
||||||
|
"disabled_by": null,
|
||||||
|
"disabled_polling": false,
|
||||||
|
"id": "bf216113c71bf01a18jtl0",
|
||||||
|
"name": "blinds",
|
||||||
|
"category": "cl",
|
||||||
|
"product_id": "cpbo62rn",
|
||||||
|
"product_name": "curtain robot",
|
||||||
|
"online": true,
|
||||||
|
"sub": true,
|
||||||
|
"time_zone": "+00:00",
|
||||||
|
"active_time": "2023-06-29T15:14:19+00:00",
|
||||||
|
"create_time": "2023-06-29T15:14:19+00:00",
|
||||||
|
"update_time": "2023-06-29T15:14:19+00:00",
|
||||||
|
"function": {
|
||||||
|
"control": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["open", "stop", "close", "continue"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mode": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["morning", "night"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status_range": {
|
||||||
|
"control": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["open", "stop", "close", "continue"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_state": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mode": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["morning", "night"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fault": {
|
||||||
|
"type": "Bitmap",
|
||||||
|
"value": {
|
||||||
|
"label": ["motor_fault"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"battery_percentage": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"control": "stop",
|
||||||
|
"percent_control": 63,
|
||||||
|
"percent_state": 64,
|
||||||
|
"mode": "morning",
|
||||||
|
"fault": 0,
|
||||||
|
"battery_percentage": 100
|
||||||
|
},
|
||||||
|
"set_up": true,
|
||||||
|
"support_local": true
|
||||||
|
}
|
58
tests/components/tuya/fixtures/cl_ebt12ypvexnixvtf.json
Normal file
58
tests/components/tuya/fixtures/cl_ebt12ypvexnixvtf.json
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"endpoint": "https://openapi.tuyaeu.com",
|
||||||
|
"auth_type": 0,
|
||||||
|
"country_code": "61",
|
||||||
|
"app_type": "smartlife",
|
||||||
|
"mqtt_connected": true,
|
||||||
|
"disabled_by": null,
|
||||||
|
"disabled_polling": false,
|
||||||
|
"name": "Kitchen Blinds",
|
||||||
|
"model": "KASMARTBLIA",
|
||||||
|
"category": "cl",
|
||||||
|
"product_id": "ebt12ypvexnixvtf",
|
||||||
|
"product_name": "Smart Blinds",
|
||||||
|
"online": true,
|
||||||
|
"sub": false,
|
||||||
|
"time_zone": "+10:00",
|
||||||
|
"active_time": "2022-01-13T23:10:34+00:00",
|
||||||
|
"create_time": "2022-01-13T23:10:34+00:00",
|
||||||
|
"update_time": "2022-02-12T10:40:15+00:00",
|
||||||
|
"function": {
|
||||||
|
"switch_1": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["open", "stop", "close", "continue"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status_range": {
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"scale": 0,
|
||||||
|
"step": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch_1": {
|
||||||
|
"type": "Boolean",
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"percent_control": 0
|
||||||
|
},
|
||||||
|
"terminal_id": "REDACTED"
|
||||||
|
}
|
67
tests/components/tuya/fixtures/cl_qqdxfdht.json
Normal file
67
tests/components/tuya/fixtures/cl_qqdxfdht.json
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"endpoint": "https://apigw.tuyaeu.com",
|
||||||
|
"terminal_id": "REDACTED",
|
||||||
|
"mqtt_connected": true,
|
||||||
|
"disabled_by": null,
|
||||||
|
"disabled_polling": false,
|
||||||
|
"id": "bfb9c4958fd06d141djpqa",
|
||||||
|
"name": "bedroom blinds",
|
||||||
|
"category": "cl",
|
||||||
|
"product_id": "qqdxfdht",
|
||||||
|
"product_name": "Blinds Drive-BLE",
|
||||||
|
"online": true,
|
||||||
|
"sub": true,
|
||||||
|
"time_zone": "+00:00",
|
||||||
|
"active_time": "2021-11-09T08:38:29+00:00",
|
||||||
|
"create_time": "2021-11-09T08:38:29+00:00",
|
||||||
|
"update_time": "2021-11-09T08:38:29+00:00",
|
||||||
|
"function": {
|
||||||
|
"control": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["open", "stop", "close", "continue"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": "0",
|
||||||
|
"max": "100",
|
||||||
|
"scale": "0",
|
||||||
|
"step": "1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status_range": {
|
||||||
|
"control": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["open", "stop", "close", "continue"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"percent_control": {
|
||||||
|
"type": "Integer",
|
||||||
|
"value": {
|
||||||
|
"unit": "%",
|
||||||
|
"min": "0",
|
||||||
|
"max": "100",
|
||||||
|
"scale": "0",
|
||||||
|
"step": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"work_state": {
|
||||||
|
"type": "Enum",
|
||||||
|
"value": {
|
||||||
|
"range": ["opening", "closing"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"control": "stop",
|
||||||
|
"percent_control": 100,
|
||||||
|
"work_state": "closing"
|
||||||
|
},
|
||||||
|
"set_up": true,
|
||||||
|
"support_local": true
|
||||||
|
}
|
@@ -1,4 +1,208 @@
|
|||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
|
# name: test_platform_setup_and_discovery[cl_3r8gc33pnqsxfe1g][cover.lounge_dark_blind_curtain-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': 'cover',
|
||||||
|
'entity_category': None,
|
||||||
|
'entity_id': 'cover.lounge_dark_blind_curtain',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'labels': set({
|
||||||
|
}),
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': <CoverDeviceClass.CURTAIN: 'curtain'>,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Curtain',
|
||||||
|
'platform': 'tuya',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
'translation_key': 'curtain',
|
||||||
|
'unique_id': 'tuya.mocked_device_idcontrol',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_3r8gc33pnqsxfe1g][cover.lounge_dark_blind_curtain-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'current_position': 100,
|
||||||
|
'device_class': 'curtain',
|
||||||
|
'friendly_name': 'Lounge Dark Blind Curtain',
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'cover.lounge_dark_blind_curtain',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'open',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_cpbo62rn][cover.blinds_curtain-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': 'cover',
|
||||||
|
'entity_category': None,
|
||||||
|
'entity_id': 'cover.blinds_curtain',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'labels': set({
|
||||||
|
}),
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': <CoverDeviceClass.CURTAIN: 'curtain'>,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Curtain',
|
||||||
|
'platform': 'tuya',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
'translation_key': 'curtain',
|
||||||
|
'unique_id': 'tuya.bf216113c71bf01a18jtl0control',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_cpbo62rn][cover.blinds_curtain-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'current_position': 36,
|
||||||
|
'device_class': 'curtain',
|
||||||
|
'friendly_name': 'blinds Curtain',
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'cover.blinds_curtain',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'open',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_ebt12ypvexnixvtf][cover.kitchen_blinds_blind-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': 'cover',
|
||||||
|
'entity_category': None,
|
||||||
|
'entity_id': 'cover.kitchen_blinds_blind',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'labels': set({
|
||||||
|
}),
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': <CoverDeviceClass.BLIND: 'blind'>,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Blind',
|
||||||
|
'platform': 'tuya',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
'translation_key': 'blind',
|
||||||
|
'unique_id': 'tuya.mocked_device_idswitch_1',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_ebt12ypvexnixvtf][cover.kitchen_blinds_blind-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'current_position': 100,
|
||||||
|
'device_class': 'blind',
|
||||||
|
'friendly_name': 'Kitchen Blinds Blind',
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'cover.kitchen_blinds_blind',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'open',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_qqdxfdht][cover.bedroom_blinds_curtain-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': 'cover',
|
||||||
|
'entity_category': None,
|
||||||
|
'entity_id': 'cover.bedroom_blinds_curtain',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'labels': set({
|
||||||
|
}),
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': <CoverDeviceClass.CURTAIN: 'curtain'>,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Curtain',
|
||||||
|
'platform': 'tuya',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
'translation_key': 'curtain',
|
||||||
|
'unique_id': 'tuya.bfb9c4958fd06d141djpqacontrol',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_qqdxfdht][cover.bedroom_blinds_curtain-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'current_position': 0,
|
||||||
|
'device_class': 'curtain',
|
||||||
|
'friendly_name': 'bedroom blinds Curtain',
|
||||||
|
'supported_features': <CoverEntityFeature: 15>,
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'cover.bedroom_blinds_curtain',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'closed',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_platform_setup_and_discovery[cl_zah67ekd][cover.kitchen_blinds_curtain-entry]
|
# name: test_platform_setup_and_discovery[cl_zah67ekd][cover.kitchen_blinds_curtain-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
|
@@ -1,4 +1,61 @@
|
|||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
|
# name: test_platform_setup_and_discovery[cl_cpbo62rn][select.blinds_mode-entry]
|
||||||
|
EntityRegistryEntrySnapshot({
|
||||||
|
'aliases': set({
|
||||||
|
}),
|
||||||
|
'area_id': None,
|
||||||
|
'capabilities': dict({
|
||||||
|
'options': list([
|
||||||
|
'morning',
|
||||||
|
'night',
|
||||||
|
]),
|
||||||
|
}),
|
||||||
|
'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.blinds_mode',
|
||||||
|
'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': 'Mode',
|
||||||
|
'platform': 'tuya',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'curtain_mode',
|
||||||
|
'unique_id': 'tuya.bf216113c71bf01a18jtl0mode',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_cpbo62rn][select.blinds_mode-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'friendly_name': 'blinds Mode',
|
||||||
|
'options': list([
|
||||||
|
'morning',
|
||||||
|
'night',
|
||||||
|
]),
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'select.blinds_mode',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'morning',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_platform_setup_and_discovery[cl_zah67ekd][select.kitchen_blinds_motor_mode-entry]
|
# name: test_platform_setup_and_discovery[cl_zah67ekd][select.kitchen_blinds_motor_mode-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
|
@@ -1,4 +1,53 @@
|
|||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
|
# name: test_platform_setup_and_discovery[cl_3r8gc33pnqsxfe1g][sensor.lounge_dark_blind_last_operation_duration-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': 'sensor',
|
||||||
|
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||||
|
'entity_id': 'sensor.lounge_dark_blind_last_operation_duration',
|
||||||
|
'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': 'Last operation duration',
|
||||||
|
'platform': 'tuya',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'last_operation_duration',
|
||||||
|
'unique_id': 'tuya.mocked_device_idtime_total',
|
||||||
|
'unit_of_measurement': 'ms',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_3r8gc33pnqsxfe1g][sensor.lounge_dark_blind_last_operation_duration-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'friendly_name': 'Lounge Dark Blind Last operation duration',
|
||||||
|
'unit_of_measurement': 'ms',
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'sensor.lounge_dark_blind_last_operation_duration',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': '25400.0',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_platform_setup_and_discovery[co2bj_yrr3eiyiacm31ski][sensor.aqi_battery-entry]
|
# name: test_platform_setup_and_discovery[co2bj_yrr3eiyiacm31ski][sensor.aqi_battery-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
|
@@ -1,4 +1,52 @@
|
|||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
|
# name: test_platform_setup_and_discovery[cl_3r8gc33pnqsxfe1g][switch.lounge_dark_blind_reverse-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.lounge_dark_blind_reverse',
|
||||||
|
'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': 'Reverse',
|
||||||
|
'platform': 'tuya',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'reverse',
|
||||||
|
'unique_id': 'tuya.mocked_device_idcontrol_back',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_platform_setup_and_discovery[cl_3r8gc33pnqsxfe1g][switch.lounge_dark_blind_reverse-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'friendly_name': 'Lounge Dark Blind Reverse',
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'switch.lounge_dark_blind_reverse',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'on',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_platform_setup_and_discovery[cs_ka2wfrdoogpvgzfi][switch.dehumidifer_child_lock-entry]
|
# name: test_platform_setup_and_discovery[cs_ka2wfrdoogpvgzfi][switch.dehumidifer_child_lock-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
|
Reference in New Issue
Block a user