Add Tuya test fixtures (#150835)

This commit is contained in:
epenet
2025-08-19 11:34:25 +02:00
committed by GitHub
parent fc5e720764
commit 899f0e03c1
11 changed files with 1209 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ DEVICE_MOCKS = [
"cl_3r8gc33pnqsxfe1g", # https://github.com/tuya/tuya-home-assistant/issues/754 "cl_3r8gc33pnqsxfe1g", # https://github.com/tuya/tuya-home-assistant/issues/754
"cl_cpbo62rn", # https://github.com/orgs/home-assistant/discussions/539 "cl_cpbo62rn", # https://github.com/orgs/home-assistant/discussions/539
"cl_ebt12ypvexnixvtf", # https://github.com/tuya/tuya-home-assistant/issues/754 "cl_ebt12ypvexnixvtf", # https://github.com/tuya/tuya-home-assistant/issues/754
"cl_g1cp07dsqnbdbbki", # https://github.com/home-assistant/core/issues/139966
"cl_qqdxfdht", # https://github.com/orgs/home-assistant/discussions/539 "cl_qqdxfdht", # https://github.com/orgs/home-assistant/discussions/539
"cl_zah67ekd", # https://github.com/home-assistant/core/issues/71242 "cl_zah67ekd", # https://github.com/home-assistant/core/issues/71242
"clkg_nhyj64w2", # https://github.com/home-assistant/core/issues/136055 "clkg_nhyj64w2", # https://github.com/home-assistant/core/issues/136055
@@ -112,10 +113,12 @@ DEVICE_MOCKS = [
"dr_pjvxl1wsyqxivsaf", # https://github.com/home-assistant/core/issues/84869 "dr_pjvxl1wsyqxivsaf", # https://github.com/home-assistant/core/issues/84869
"fs_g0ewlb1vmwqljzji", # https://github.com/home-assistant/core/issues/141231 "fs_g0ewlb1vmwqljzji", # https://github.com/home-assistant/core/issues/141231
"fs_ibytpo6fpnugft1c", # https://github.com/home-assistant/core/issues/135541 "fs_ibytpo6fpnugft1c", # https://github.com/home-assistant/core/issues/135541
"fsd_9ecs16c53uqskxw6", # https://github.com/home-assistant/core/issues/149233
"gyd_lgekqfxdabipm3tn", # https://github.com/home-assistant/core/issues/133173 "gyd_lgekqfxdabipm3tn", # https://github.com/home-assistant/core/issues/133173
"hps_2aaelwxk", # https://github.com/home-assistant/core/issues/149704 "hps_2aaelwxk", # https://github.com/home-assistant/core/issues/149704
"hps_wqashyqo", # https://github.com/home-assistant/core/issues/146180 "hps_wqashyqo", # https://github.com/home-assistant/core/issues/146180
"hwsb_ircs2n82vgrozoew", # https://github.com/home-assistant/core/issues/149233 "hwsb_ircs2n82vgrozoew", # https://github.com/home-assistant/core/issues/149233
"jtmspro_xqeob8h6", # https://github.com/orgs/home-assistant/discussions/517
"kg_4nqs33emdwJxpQ8O", # https://github.com/orgs/home-assistant/discussions/539 "kg_4nqs33emdwJxpQ8O", # https://github.com/orgs/home-assistant/discussions/539
"kg_5ftkaulg", # https://github.com/orgs/home-assistant/discussions/539 "kg_5ftkaulg", # https://github.com/orgs/home-assistant/discussions/539
"kg_gbm9ata1zrzaez4a", # https://github.com/home-assistant/core/issues/148347 "kg_gbm9ata1zrzaez4a", # https://github.com/home-assistant/core/issues/148347
@@ -179,6 +182,7 @@ DEVICE_MOCKS = [
"wk_aqoouq7x", # https://github.com/home-assistant/core/issues/146263 "wk_aqoouq7x", # https://github.com/home-assistant/core/issues/146263
"wk_ccpwojhalfxryigz", # https://github.com/home-assistant/core/issues/145551 "wk_ccpwojhalfxryigz", # https://github.com/home-assistant/core/issues/145551
"wk_fi6dne5tu4t1nm6j", # https://github.com/orgs/home-assistant/discussions/243 "wk_fi6dne5tu4t1nm6j", # https://github.com/orgs/home-assistant/discussions/243
"wk_gc1bxoq2hafxpa35", # https://github.com/home-assistant/core/issues/145551
"wk_gogb05wrtredz3bs", # https://github.com/home-assistant/core/issues/136337 "wk_gogb05wrtredz3bs", # https://github.com/home-assistant/core/issues/136337
"wk_y5obtqhuztqsf2mj", # https://github.com/home-assistant/core/issues/139735 "wk_y5obtqhuztqsf2mj", # https://github.com/home-assistant/core/issues/139735
"wkcz_gc4b1mdw7kebtuyz", # https://github.com/home-assistant/core/issues/135617 "wkcz_gc4b1mdw7kebtuyz", # https://github.com/home-assistant/core/issues/135617

View File

@@ -0,0 +1,102 @@
{
"endpoint": "https://apigw.tuyaus.com",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "Persiana do Quarto",
"category": "cl",
"product_id": "g1cp07dsqnbdbbki",
"product_name": "Smart roller blinds",
"online": true,
"sub": false,
"time_zone": "-03:00",
"active_time": "2023-06-21T04:29:09+00:00",
"create_time": "2023-06-21T04:29:09+00:00",
"update_time": "2023-06-21T04:29:09+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
}
},
"control_back_mode": {
"type": "Enum",
"value": {
"range": ["forward", "back"]
}
},
"border": {
"type": "Enum",
"value": {
"range": ["up", "down", "up_delete"]
}
}
},
"status_range": {
"control": {
"type": "Enum",
"value": {
"range": ["open", "stop", "close", "continue"]
}
},
"work_state": {
"type": "Enum",
"value": {
"range": ["opening", "closing"]
}
},
"percent_state": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
},
"percent_control": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
},
"control_back_mode": {
"type": "Enum",
"value": {
"range": ["forward", "back"]
}
},
"border": {
"type": "Enum",
"value": {
"range": ["up", "down", "up_delete"]
}
}
},
"status": {
"control": "open",
"work_state": "opening",
"percent_state": 0,
"percent_control": 100,
"control_back_mode": "back",
"border": "up"
},
"set_up": true,
"support_local": true
}

View File

@@ -0,0 +1,151 @@
{
"endpoint": "https://apigw.tuyaeu.com",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "ceiling fan/Light v2",
"category": "fsd",
"product_id": "9ecs16c53uqskxw6",
"product_name": "ceiling fan/Light v2",
"online": true,
"sub": false,
"time_zone": "+02:00",
"active_time": "2025-07-08T17:05:22+00:00",
"create_time": "2025-07-08T17:05:22+00:00",
"update_time": "2025-07-08T17:05:22+00:00",
"function": {
"switch_led": {
"type": "Boolean",
"value": {}
},
"work_mode": {
"type": "Enum",
"value": {
"range": ["white", "colour", "scene", "music"]
}
},
"temp_value": {
"type": "Integer",
"value": {
"min": 0,
"max": 1000,
"scale": 0,
"step": 1
}
},
"scene_data": {
"type": "String",
"value": {
"maxlen": 255
}
},
"fan_switch": {
"type": "Boolean",
"value": {}
},
"fan_speed": {
"type": "Integer",
"value": {
"unit": "",
"min": 1,
"max": 6,
"scale": 0,
"step": 1
}
},
"fan_direction": {
"type": "Enum",
"value": {
"range": ["forward", "reverse"]
}
},
"countdown_left_fan": {
"type": "Integer",
"value": {
"unit": "min",
"min": 0,
"max": 540,
"scale": 0,
"step": 1
}
},
"fan_beep": {
"type": "Boolean",
"value": {}
}
},
"status_range": {
"switch_led": {
"type": "Boolean",
"value": {}
},
"work_mode": {
"type": "Enum",
"value": {
"range": ["white", "colour", "scene", "music"]
}
},
"temp_value": {
"type": "Integer",
"value": {
"min": 0,
"max": 1000,
"scale": 0,
"step": 1
}
},
"scene_data": {
"type": "String",
"value": {
"maxlen": 255
}
},
"fan_switch": {
"type": "Boolean",
"value": {}
},
"fan_speed": {
"type": "Integer",
"value": {
"unit": "",
"min": 1,
"max": 6,
"scale": 0,
"step": 1
}
},
"fan_direction": {
"type": "Enum",
"value": {
"range": ["forward", "reverse"]
}
},
"countdown_left_fan": {
"type": "Integer",
"value": {
"unit": "min",
"min": 0,
"max": 540,
"scale": 0,
"step": 1
}
},
"fan_beep": {
"type": "Boolean",
"value": {}
}
},
"status": {
"switch_led": true,
"work_mode": "white",
"temp_value": 0,
"scene_data": "",
"fan_switch": true,
"fan_speed": 2,
"fan_direction": "forward",
"countdown_left_fan": 0,
"fan_beep": false
},
"set_up": true,
"support_local": true
}

View File

@@ -0,0 +1,398 @@
{
"endpoint": "https://apigw.tuyaeu.com",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "S1-TY-BLE-PRO 2",
"category": "jtmspro",
"product_id": "xqeob8h6",
"product_name": "S1-TY-BLE-PRO",
"online": false,
"sub": true,
"time_zone": "+03:00",
"active_time": "2025-07-01T15:21:36+00:00",
"create_time": "2025-07-01T15:21:36+00:00",
"update_time": "2025-07-01T15:21:36+00:00",
"function": {
"unlock_method_create": {
"type": "Raw",
"value": {}
},
"unlock_method_delete": {
"type": "Raw",
"value": {}
},
"unlock_method_modify": {
"type": "Raw",
"value": {}
},
"lock_record": {
"type": "Raw",
"value": {}
},
"message": {
"type": "Boolean",
"value": {}
},
"automatic_lock": {
"type": "Boolean",
"value": {}
},
"unlock_switch": {
"type": "Enum",
"value": {
"range": ["single_unlock", "finger_card"]
}
},
"auto_lock_time": {
"type": "Integer",
"value": {
"min": 1,
"max": 1800,
"scale": 0,
"step": 1
}
},
"rtc_lock": {
"type": "Boolean",
"value": {}
},
"manual_lock": {
"type": "Boolean",
"value": {}
},
"synch_method": {
"type": "Raw",
"value": {}
},
"remote_no_dp_key": {
"type": "Raw",
"value": {}
},
"record": {
"type": "Raw",
"value": {}
},
"check_code_set": {
"type": "Raw",
"value": {}
},
"ble_unlock_check": {
"type": "Raw",
"value": {}
},
"remote_pd_setkey_check": {
"type": "Raw",
"value": {}
},
"unlock_ble_ibeacon": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"ibeacon_scan_mode": {
"type": "Enum",
"value": {
"range": [
"always",
"5min",
"10min",
"20min",
"40min",
"60min",
"90min",
"120min"
]
}
},
"rssi_sensitivity_level": {
"type": "Enum",
"value": {
"range": [
"inactive",
"90db",
"80db",
"70db",
"60db",
"50db",
"40db",
"30db",
"20db"
]
}
},
"ibeacon_switch": {
"type": "Boolean",
"value": {}
}
},
"status_range": {
"unlock_method_create": {
"type": "Raw",
"value": {}
},
"unlock_method_delete": {
"type": "Raw",
"value": {}
},
"unlock_method_modify": {
"type": "Raw",
"value": {}
},
"residual_electricity": {
"type": "Integer",
"value": {
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
},
"unlock_fingerprint": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"unlock_card": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"unlock_key": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"unlock_ble": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"lock_record": {
"type": "Raw",
"value": {}
},
"alarm_lock": {
"type": "Enum",
"value": {
"range": [
"wrong_finger",
"wrong_password",
"wrong_card",
"wrong_face",
"tongue_bad",
"too_hot",
"unclosed_time",
"tongue_not_out",
"pry",
"key_in",
"low_battery",
"power_off",
"shock",
"defense"
]
}
},
"hijack": {
"type": "Boolean",
"value": {}
},
"doorbell": {
"type": "Boolean",
"value": {}
},
"message": {
"type": "Boolean",
"value": {}
},
"automatic_lock": {
"type": "Boolean",
"value": {}
},
"unlock_switch": {
"type": "Enum",
"value": {
"range": ["single_unlock", "finger_card"]
}
},
"auto_lock_time": {
"type": "Integer",
"value": {
"min": 1,
"max": 1800,
"scale": 0,
"step": 1
}
},
"closed_opened": {
"type": "Enum",
"value": {
"range": ["unknown", "open", "closed"]
}
},
"rtc_lock": {
"type": "Boolean",
"value": {}
},
"manual_lock": {
"type": "Boolean",
"value": {}
},
"lock_motor_state": {
"type": "Boolean",
"value": {}
},
"synch_method": {
"type": "Raw",
"value": {}
},
"remote_no_dp_key": {
"type": "Raw",
"value": {}
},
"unlock_phone_remote": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"unlock_voice_remote": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"record": {
"type": "Raw",
"value": {}
},
"check_code_set": {
"type": "Raw",
"value": {}
},
"ble_unlock_check": {
"type": "Raw",
"value": {}
},
"unlock_record_check": {
"type": "Raw",
"value": {}
},
"remote_pd_setkey_check": {
"type": "Raw",
"value": {}
},
"unlock_double_kit": {
"type": "Raw",
"value": {}
},
"unlock_ble_ibeacon": {
"type": "Integer",
"value": {
"min": 0,
"max": 999,
"scale": 0,
"step": 1
}
},
"ibeacon_scan_mode": {
"type": "Enum",
"value": {
"range": [
"always",
"5min",
"10min",
"20min",
"40min",
"60min",
"90min",
"120min"
]
}
},
"rssi_sensitivity_level": {
"type": "Enum",
"value": {
"range": [
"inactive",
"90db",
"80db",
"70db",
"60db",
"50db",
"40db",
"30db",
"20db"
]
}
},
"ibeacon_switch": {
"type": "Boolean",
"value": {}
}
},
"status": {
"unlock_method_create": "A/8BAQIAAA==",
"unlock_method_delete": "",
"unlock_method_modify": "",
"residual_electricity": 99,
"unlock_fingerprint": 1,
"unlock_card": 0,
"unlock_key": 0,
"unlock_ble": 1,
"lock_record": "",
"alarm_lock": "wrong_finger",
"hijack": false,
"doorbell": false,
"message": false,
"automatic_lock": true,
"unlock_switch": "single_unlock",
"auto_lock_time": 3,
"closed_opened": "unknown",
"rtc_lock": false,
"manual_lock": true,
"lock_motor_state": false,
"synch_method": "AQA=",
"remote_no_dp_key": "AAAB",
"unlock_phone_remote": 1,
"unlock_voice_remote": 0,
"record": "AAEB",
"check_code_set": "AAH//wAAAAAAAAAAAP//AA==",
"ble_unlock_check": "AAH//zY2MDkzNTA0AWhkA/QAAA==",
"unlock_record_check": "",
"remote_pd_setkey_check": "AAH//zY2MDkzNTA0AQABAA==",
"unlock_double_kit": "",
"unlock_ble_ibeacon": 0,
"ibeacon_scan_mode": "always",
"rssi_sensitivity_level": "inactive",
"ibeacon_switch": false
},
"set_up": false,
"support_local": true
}

View File

@@ -0,0 +1,110 @@
{
"endpoint": "https://apigw.tuyaeu.com",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "\u041f\u043e\u043b\u043e\u0442\u0435\u043d\u0446\u043e\u0441\u0443\u0448\u0438\u0442\u0435\u043b\u044c",
"category": "wk",
"product_id": "gc1bxoq2hafxpa35",
"product_name": "ET-44W",
"online": true,
"sub": false,
"time_zone": "+03:00",
"active_time": "2025-02-08T21:08:00+00:00",
"create_time": "2025-02-08T21:08:00+00:00",
"update_time": "2025-02-08T21:08:00+00:00",
"function": {
"switch": {
"type": "Boolean",
"value": {}
},
"mode": {
"type": "Enum",
"value": {
"range": ["holiday"]
}
},
"temp_set": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": 50,
"max": 400,
"scale": 1,
"step": 5
}
},
"temp_set_f": {
"type": "Integer",
"value": {
"unit": "\u2109",
"min": 410,
"max": 1040,
"scale": 1,
"step": 10
}
}
},
"status_range": {
"switch": {
"type": "Boolean",
"value": {}
},
"mode": {
"type": "Enum",
"value": {
"range": ["holiday"]
}
},
"temp_set": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": 50,
"max": 400,
"scale": 1,
"step": 5
}
},
"temp_set_f": {
"type": "Integer",
"value": {
"unit": "\u2109",
"min": 410,
"max": 1040,
"scale": 1,
"step": 10
}
},
"temp_current": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": 0,
"max": 450,
"scale": 1,
"step": 5
}
},
"temp_current_f": {
"type": "Integer",
"value": {
"unit": "\u2109",
"min": 320,
"max": 1130,
"scale": 1,
"step": 10
}
}
},
"status": {
"switch": false,
"mode": "hold",
"temp_set": 50,
"temp_set_f": 410,
"temp_current": 253,
"temp_current_f": 320
},
"set_up": true,
"support_local": true
}

View File

@@ -431,6 +431,79 @@
'state': 'off', 'state': 'off',
}) })
# --- # ---
# name: test_platform_setup_and_discovery[climate.polotentsosushitel-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'hvac_modes': list([
<HVACMode.OFF: 'off'>,
<HVACMode.HEAT_COOL: 'heat_cool'>,
]),
'max_temp': 40.0,
'min_temp': 5.0,
'preset_modes': list([
'holiday',
]),
'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.polotentsosushitel',
'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: 401>,
'translation_key': None,
'unique_id': 'tuya.53apxfah2qoxb1cgkw',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[climate.polotentsosushitel-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'current_temperature': 25.3,
'friendly_name': 'Полотенцосушитель',
'hvac_modes': list([
<HVACMode.OFF: 'off'>,
<HVACMode.HEAT_COOL: 'heat_cool'>,
]),
'max_temp': 40.0,
'min_temp': 5.0,
'preset_mode': 'hold',
'preset_modes': list([
'holiday',
]),
'supported_features': <ClimateEntityFeature: 401>,
'target_temp_step': 0.5,
'temperature': 5.0,
}),
'context': <ANY>,
'entity_id': 'climate.polotentsosushitel',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_platform_setup_and_discovery[climate.smart_thermostats-entry] # name: test_platform_setup_and_discovery[climate.smart_thermostats-entry]
EntityRegistryEntrySnapshot({ EntityRegistryEntrySnapshot({
'aliases': set({ 'aliases': set({

View File

@@ -254,6 +254,57 @@
'state': 'open', 'state': 'open',
}) })
# --- # ---
# name: test_platform_setup_and_discovery[cover.persiana_do_quarto_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.persiana_do_quarto_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.ikbbdbnqsd70pc1glccontrol',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[cover.persiana_do_quarto_curtain-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'current_position': 100,
'device_class': 'curtain',
'friendly_name': 'Persiana do Quarto Curtain',
'supported_features': <CoverEntityFeature: 15>,
}),
'context': <ANY>,
'entity_id': 'cover.persiana_do_quarto_curtain',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'open',
})
# ---
# name: test_platform_setup_and_discovery[cover.tapparelle_studio_curtain-entry] # name: test_platform_setup_and_discovery[cover.tapparelle_studio_curtain-entry]
EntityRegistryEntrySnapshot({ EntityRegistryEntrySnapshot({
'aliases': set({ 'aliases': set({

View File

@@ -56,6 +56,64 @@
'state': 'off', 'state': 'off',
}) })
# --- # ---
# name: test_platform_setup_and_discovery[fan.ceiling_fan_light_v2-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'preset_modes': list([
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'fan',
'entity_category': None,
'entity_id': 'fan.ceiling_fan_light_v2',
'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': <FanEntityFeature: 53>,
'translation_key': None,
'unique_id': 'tuya.6wxksqu35c61sce9dsf',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[fan.ceiling_fan_light_v2-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'direction': 'forward',
'friendly_name': 'ceiling fan/Light v2',
'percentage': 20,
'percentage_step': 1.0,
'preset_mode': None,
'preset_modes': list([
]),
'supported_features': <FanEntityFeature: 53>,
}),
'context': <ANY>,
'entity_id': 'fan.ceiling_fan_light_v2',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_platform_setup_and_discovery[fan.ceiling_fan_with_light-entry] # name: test_platform_setup_and_discovery[fan.ceiling_fan_with_light-entry]
EntityRegistryEntrySnapshot({ EntityRegistryEntrySnapshot({
'aliases': set({ 'aliases': set({

View File

@@ -402,6 +402,37 @@
'via_device_id': None, 'via_device_id': None,
}) })
# --- # ---
# name: test_device_registry[53apxfah2qoxb1cgkw]
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',
'53apxfah2qoxb1cgkw',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'ET-44W',
'model_id': 'gc1bxoq2hafxpa35',
'name': 'Полотенцосушитель',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[53fnjncm3jywuaznps] # name: test_device_registry[53fnjncm3jywuaznps]
DeviceRegistryEntrySnapshot({ DeviceRegistryEntrySnapshot({
'area_id': None, 'area_id': None,
@@ -588,6 +619,37 @@
'via_device_id': None, 'via_device_id': None,
}) })
# --- # ---
# name: test_device_registry[6h8boeqxorpsmtj]
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',
'6h8boeqxorpsmtj',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'S1-TY-BLE-PRO (unsupported)',
'model_id': 'xqeob8h6',
'name': 'S1-TY-BLE-PRO 2',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[6o148laaosbf0g4djd] # name: test_device_registry[6o148laaosbf0g4djd]
DeviceRegistryEntrySnapshot({ DeviceRegistryEntrySnapshot({
'area_id': None, 'area_id': None,
@@ -650,6 +712,37 @@
'via_device_id': None, 'via_device_id': None,
}) })
# --- # ---
# name: test_device_registry[6wxksqu35c61sce9dsf]
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',
'6wxksqu35c61sce9dsf',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'ceiling fan/Light v2',
'model_id': '9ecs16c53uqskxw6',
'name': 'ceiling fan/Light v2',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[73ov8i8iedtylkzrqzkfs] # name: test_device_registry[73ov8i8iedtylkzrqzkfs]
DeviceRegistryEntrySnapshot({ DeviceRegistryEntrySnapshot({
'area_id': None, 'area_id': None,
@@ -2882,6 +2975,37 @@
'via_device_id': None, 'via_device_id': None,
}) })
# --- # ---
# name: test_device_registry[ikbbdbnqsd70pc1glc]
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',
'ikbbdbnqsd70pc1glc',
),
}),
'labels': set({
}),
'manufacturer': 'Tuya',
'model': 'Smart roller blinds',
'model_id': 'g1cp07dsqnbdbbki',
'name': 'Persiana do Quarto',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
})
# ---
# name: test_device_registry[iks13mcaiyie3rryjb2oc] # name: test_device_registry[iks13mcaiyie3rryjb2oc]
DeviceRegistryEntrySnapshot({ DeviceRegistryEntrySnapshot({
'area_id': None, 'area_id': None,

View File

@@ -459,6 +459,87 @@
'state': 'off', 'state': 'off',
}) })
# --- # ---
# name: test_platform_setup_and_discovery[light.ceiling_fan_light_v2-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max_color_temp_kelvin': 6500,
'max_mireds': 500,
'min_color_temp_kelvin': 2000,
'min_mireds': 153,
'supported_color_modes': list([
<ColorMode.COLOR_TEMP: 'color_temp'>,
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'light',
'entity_category': None,
'entity_id': 'light.ceiling_fan_light_v2',
'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': 0,
'translation_key': None,
'unique_id': 'tuya.6wxksqu35c61sce9dsfswitch_led',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[light.ceiling_fan_light_v2-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'brightness': None,
'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>,
'color_temp': 500,
'color_temp_kelvin': 2000,
'friendly_name': 'ceiling fan/Light v2',
'hs_color': tuple(
30.601,
94.547,
),
'max_color_temp_kelvin': 6500,
'max_mireds': 500,
'min_color_temp_kelvin': 2000,
'min_mireds': 153,
'rgb_color': tuple(
255,
137,
14,
),
'supported_color_modes': list([
<ColorMode.COLOR_TEMP: 'color_temp'>,
]),
'supported_features': <LightEntityFeature: 0>,
'xy_color': tuple(
0.598,
0.383,
),
}),
'context': <ANY>,
'entity_id': 'light.ceiling_fan_light_v2',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_platform_setup_and_discovery[light.ceiling_fan_with_light-entry] # name: test_platform_setup_and_discovery[light.ceiling_fan_with_light-entry]
EntityRegistryEntrySnapshot({ EntityRegistryEntrySnapshot({
'aliases': set({ 'aliases': set({

View File

@@ -3018,6 +3018,63 @@
'state': 'last', 'state': 'last',
}) })
# --- # ---
# name: test_platform_setup_and_discovery[select.persiana_do_quarto_motor_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
'forward',
'back',
]),
}),
'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.persiana_do_quarto_motor_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': 'Motor mode',
'platform': 'tuya',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'curtain_motor_mode',
'unique_id': 'tuya.ikbbdbnqsd70pc1glccontrol_back_mode',
'unit_of_measurement': None,
})
# ---
# name: test_platform_setup_and_discovery[select.persiana_do_quarto_motor_mode-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Persiana do Quarto Motor mode',
'options': list([
'forward',
'back',
]),
}),
'context': <ANY>,
'entity_id': 'select.persiana_do_quarto_motor_mode',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'back',
})
# ---
# name: test_platform_setup_and_discovery[select.raspy4_home_assistant_indicator_light_mode-entry] # name: test_platform_setup_and_discovery[select.raspy4_home_assistant_indicator_light_mode-entry]
EntityRegistryEntrySnapshot({ EntityRegistryEntrySnapshot({
'aliases': set({ 'aliases': set({