diff --git a/tests/components/tuya/fixtures/dj_k3okx0w3bsgmindp.json b/tests/components/tuya/fixtures/dj_k3okx0w3bsgmindp.json new file mode 100644 index 00000000000..c7922d14436 --- /dev/null +++ b/tests/components/tuya/fixtures/dj_k3okx0w3bsgmindp.json @@ -0,0 +1,921 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Portal Casa Carro Jalimy", + "category": "dj", + "product_id": "k3okx0w3bsgmindp", + "product_name": "Smart Bulb", + "online": false, + "sub": false, + "time_zone": "-03:00", + "active_time": "2024-01-10T13:53:29+00:00", + "create_time": "2024-01-10T13:53:29+00:00", + "update_time": "2024-01-10T13:53:29+00:00", + "function": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "rhythm_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "sleep_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "wakeup_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "power_memory": { + "type": "Raw", + "value": {} + }, + "do_not_disturb": { + "type": "Boolean", + "value": {} + }, + "cycle_timing": { + "type": "Raw", + "value": {} + }, + "random_timing": { + "type": "Raw", + "value": {} + } + }, + "status_range": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "rhythm_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "sleep_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "wakeup_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "power_memory": { + "type": "Raw", + "value": {} + }, + "do_not_disturb": { + "type": "Boolean", + "value": {} + }, + "cycle_timing": { + "type": "Raw", + "value": {} + }, + "random_timing": { + "type": "Raw", + "value": {} + } + }, + "status": { + "switch_led": true, + "work_mode": "white", + "bright_value_v2": 1000, + "temp_value_v2": 1000, + "colour_data_v2": "{\"h\":0,\"s\":1000,\"v\":1000}", + "scene_data_v2": "{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":0,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}", + "countdown_1": 0, + "music_data": "", + "control_data": "", + "rhythm_mode": "AAAAAAA=", + "sleep_mode": "AAA=", + "wakeup_mode": "AAA=", + "power_memory": "AAEAAAPoA+gD6APo", + "do_not_disturb": false, + "cycle_timing": "AAAA", + "random_timing": "AAAA" + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "20": { + "value_convert": "default", + "status_code": "switch_led", + "config_item": { + "statusFormat": { + "switch_led": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "21": { + "value_convert": "default", + "status_code": "work_mode", + "config_item": { + "statusFormat": { + "work_mode": "$" + }, + "valueDesc": { + "range": ["white", "colour", "scene", "music"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "22": { + "value_convert": "default", + "status_code": "bright_value_v2", + "config_item": { + "statusFormat": { + "bright_value_v2": "$" + }, + "valueDesc": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "23": { + "value_convert": "default", + "status_code": "temp_value_v2", + "config_item": { + "statusFormat": { + "temp_value_v2": "$" + }, + "valueDesc": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "24": { + "value_convert": "dj_v2_color_alg", + "status_code": "colour_data_v2", + "config_item": { + "statusFormat": { + "colour_data_v2": "$" + }, + "valueDesc": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "25": { + "value_convert": "dj_v2_scene_alg", + "status_code": "scene_data_v2", + "config_item": { + "statusFormat": { + "scene_data_v2": "$" + }, + "valueDesc": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "26": { + "value_convert": "default", + "status_code": "countdown_1", + "config_item": { + "statusFormat": { + "countdown_1": "$" + }, + "valueDesc": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "27": { + "value_convert": "dj_v2_music_alg", + "status_code": "music_data", + "config_item": { + "statusFormat": { + "music_data": "$" + }, + "valueDesc": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "28": { + "value_convert": "dj_v2_contr_alg", + "status_code": "control_data", + "config_item": { + "statusFormat": { + "control_data": "$" + }, + "valueDesc": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "30": { + "value_convert": "default", + "status_code": "rhythm_mode", + "config_item": { + "statusFormat": { + "rhythm_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "31": { + "value_convert": "default", + "status_code": "sleep_mode", + "config_item": { + "statusFormat": { + "sleep_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "32": { + "value_convert": "default", + "status_code": "wakeup_mode", + "config_item": { + "statusFormat": { + "wakeup_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "33": { + "value_convert": "default", + "status_code": "power_memory", + "config_item": { + "statusFormat": { + "power_memory": "$" + }, + "valueDesc": {}, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "34": { + "value_convert": "default", + "status_code": "do_not_disturb", + "config_item": { + "statusFormat": { + "do_not_disturb": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "209": { + "value_convert": "default", + "status_code": "cycle_timing", + "config_item": { + "statusFormat": { + "cycle_timing": "$" + }, + "valueDesc": {}, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + }, + "210": { + "value_convert": "default", + "status_code": "random_timing", + "config_item": { + "statusFormat": { + "random_timing": "$" + }, + "valueDesc": {}, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "k3okx0w3bsgmindp" + } + } + } +} diff --git a/tests/components/tuya/fixtures/dj_oj4fqh3fo3obgu6a.json b/tests/components/tuya/fixtures/dj_oj4fqh3fo3obgu6a.json new file mode 100644 index 00000000000..12b4f0c885b --- /dev/null +++ b/tests/components/tuya/fixtures/dj_oj4fqh3fo3obgu6a.json @@ -0,0 +1,830 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "L├ímpara Ati", + "category": "dj", + "product_id": "oj4fqh3fo3obgu6a", + "product_name": "Lampada Wi-Fi+bluetooth", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2025-11-24T23:54:50+00:00", + "create_time": "2025-11-24T23:54:50+00:00", + "update_time": "2025-11-24T23:54:50+00:00", + "function": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "rhythm_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "sleep_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "wakeup_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + } + }, + "status_range": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "rhythm_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "sleep_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "wakeup_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + } + }, + "status": { + "switch_led": false, + "work_mode": "white", + "bright_value_v2": 10, + "temp_value_v2": 0, + "colour_data_v2": "{\"h\":0,\"s\":1000,\"v\":1000}", + "scene_data_v2": "{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":0,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}", + "countdown_1": 0, + "music_data": "", + "control_data": "", + "rhythm_mode": "AAAAAAA=", + "sleep_mode": "AAA=", + "wakeup_mode": "AAA=" + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "20": { + "value_convert": "default", + "status_code": "switch_led", + "config_item": { + "statusFormat": { + "switch_led": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "21": { + "value_convert": "default", + "status_code": "work_mode", + "config_item": { + "statusFormat": { + "work_mode": "$" + }, + "valueDesc": { + "range": ["white", "colour", "scene", "music"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "22": { + "value_convert": "default", + "status_code": "bright_value_v2", + "config_item": { + "statusFormat": { + "bright_value_v2": "$" + }, + "valueDesc": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "23": { + "value_convert": "default", + "status_code": "temp_value_v2", + "config_item": { + "statusFormat": { + "temp_value_v2": "$" + }, + "valueDesc": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "24": { + "value_convert": "dj_v2_color_alg", + "status_code": "colour_data_v2", + "config_item": { + "statusFormat": { + "colour_data_v2": "$" + }, + "valueDesc": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "25": { + "value_convert": "dj_v2_scene_alg", + "status_code": "scene_data_v2", + "config_item": { + "statusFormat": { + "scene_data_v2": "$" + }, + "valueDesc": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "26": { + "value_convert": "default", + "status_code": "countdown_1", + "config_item": { + "statusFormat": { + "countdown_1": "$" + }, + "valueDesc": { + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "27": { + "value_convert": "dj_v2_music_alg", + "status_code": "music_data", + "config_item": { + "statusFormat": { + "music_data": "$" + }, + "valueDesc": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "28": { + "value_convert": "dj_v2_contr_alg", + "status_code": "control_data", + "config_item": { + "statusFormat": { + "control_data": "$" + }, + "valueDesc": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "30": { + "value_convert": "default", + "status_code": "rhythm_mode", + "config_item": { + "statusFormat": { + "rhythm_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "31": { + "value_convert": "default", + "status_code": "sleep_mode", + "config_item": { + "statusFormat": { + "sleep_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + }, + "32": { + "value_convert": "default", + "status_code": "wakeup_mode", + "config_item": { + "statusFormat": { + "wakeup_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "oj4fqh3fo3obgu6a" + } + } + } +} diff --git a/tests/components/tuya/fixtures/dj_p06rbu0a9jp37ixo.json b/tests/components/tuya/fixtures/dj_p06rbu0a9jp37ixo.json new file mode 100644 index 00000000000..de35bdd6b08 --- /dev/null +++ b/tests/components/tuya/fixtures/dj_p06rbu0a9jp37ixo.json @@ -0,0 +1,899 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Jardim Casa", + "category": "dj", + "product_id": "p06rbu0a9jp37ixo", + "product_name": "JRBULB", + "online": false, + "sub": false, + "time_zone": "-03:00", + "active_time": "2023-11-25T21:45:12+00:00", + "create_time": "2023-11-25T21:45:12+00:00", + "update_time": "2023-11-25T21:45:12+00:00", + "function": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "rhythm_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "sleep_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "wakeup_mode": { + "type": "Raw", + "value": { + "maxlen": 255 + } + }, + "power_memory": { + "type": "Raw", + "value": {} + }, + "do_not_disturb": { + "type": "Boolean", + "value": {} + }, + "remote_switch": { + "type": "Boolean", + "value": {} + } + }, + "status_range": { + "switch_led": { + "type": "Boolean", + "value": {} + }, + "work_mode": { + "type": "Enum", + "value": { + "range": ["white", "colour", "scene", "music"] + } + }, + "bright_value_v2": { + "type": "Integer", + "value": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "temp_value_v2": { + "type": "Integer", + "value": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "colour_data_v2": { + "type": "Json", + "value": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "scene_data_v2": { + "type": "Json", + "value": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + } + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "music_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "control_data": { + "type": "Json", + "value": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + } + }, + "rhythm_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "sleep_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "wakeup_mode": { + "type": "Raw", + "value": { + "maxlen": "255" + } + }, + "power_memory": { + "type": "Raw", + "value": {} + }, + "do_not_disturb": { + "type": "Boolean", + "value": {} + }, + "remote_switch": { + "type": "Boolean", + "value": {} + } + }, + "status": { + "switch_led": true, + "work_mode": "white", + "bright_value_v2": 1000, + "temp_value_v2": 1000, + "colour_data_v2": "{\"h\":0,\"s\":1000,\"v\":1000}", + "scene_data_v2": "{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":0,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}", + "countdown_1": 0, + "music_data": "", + "control_data": "", + "rhythm_mode": "AAAAAAA=", + "sleep_mode": "AAA=", + "wakeup_mode": "AAA=", + "power_memory": "AAEAAAPoA+gD6APo", + "do_not_disturb": false, + "remote_switch": true + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "20": { + "value_convert": "default", + "status_code": "switch_led", + "config_item": { + "statusFormat": { + "switch_led": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "21": { + "value_convert": "default", + "status_code": "work_mode", + "config_item": { + "statusFormat": { + "work_mode": "$" + }, + "valueDesc": { + "range": ["white", "colour", "scene", "music"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "22": { + "value_convert": "default", + "status_code": "bright_value_v2", + "config_item": { + "statusFormat": { + "bright_value_v2": "$" + }, + "valueDesc": { + "min": 10, + "max": 1000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "23": { + "value_convert": "default", + "status_code": "temp_value_v2", + "config_item": { + "statusFormat": { + "temp_value_v2": "$" + }, + "valueDesc": { + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "24": { + "value_convert": "dj_v2_color_alg", + "status_code": "colour_data_v2", + "config_item": { + "statusFormat": { + "colour_data_v2": "$" + }, + "valueDesc": { + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "25": { + "value_convert": "dj_v2_scene_alg", + "status_code": "scene_data_v2", + "config_item": { + "statusFormat": { + "scene_data_v2": "$" + }, + "valueDesc": { + "scene_num": { + "min": 1, + "scale": 0, + "max": 8, + "step": 1 + }, + "scene_units": { + "unit_change_mode": { + "range": ["static", "jump", "gradient"] + }, + "unit_switch_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "unit_gradient_duration": { + "min": 0, + "scale": 0, + "max": 100, + "step": 1 + }, + "bright": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + } + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "26": { + "value_convert": "default", + "status_code": "countdown_1", + "config_item": { + "statusFormat": { + "countdown_1": "$" + }, + "valueDesc": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "27": { + "value_convert": "dj_v2_music_alg", + "status_code": "music_data", + "config_item": { + "statusFormat": { + "music_data": "$" + }, + "valueDesc": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "28": { + "value_convert": "dj_v2_contr_alg", + "status_code": "control_data", + "config_item": { + "statusFormat": { + "control_data": "$" + }, + "valueDesc": { + "change_mode": { + "range": ["direct", "gradient"] + }, + "bright": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "temperature": { + "min": 0, + "scale": 0, + "unit": "", + "max": 1000, + "step": 1 + }, + "h": { + "min": 0, + "scale": 0, + "unit": "", + "max": 360, + "step": 1 + }, + "s": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + }, + "v": { + "min": 0, + "scale": 0, + "unit": "", + "max": 255, + "step": 1 + } + }, + "valueType": "Json", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "30": { + "value_convert": "default", + "status_code": "rhythm_mode", + "config_item": { + "statusFormat": { + "rhythm_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "31": { + "value_convert": "default", + "status_code": "sleep_mode", + "config_item": { + "statusFormat": { + "sleep_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "32": { + "value_convert": "default", + "status_code": "wakeup_mode", + "config_item": { + "statusFormat": { + "wakeup_mode": "$" + }, + "valueDesc": { + "maxlen": "255" + }, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "33": { + "value_convert": "default", + "status_code": "power_memory", + "config_item": { + "statusFormat": { + "power_memory": "$" + }, + "valueDesc": {}, + "valueType": "Raw", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "34": { + "value_convert": "default", + "status_code": "do_not_disturb", + "config_item": { + "statusFormat": { + "do_not_disturb": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + }, + "41": { + "value_convert": "default", + "status_code": "remote_switch", + "config_item": { + "statusFormat": { + "remote_switch": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "p06rbu0a9jp37ixo" + } + } + } +} diff --git a/tests/components/tuya/fixtures/hjjcy_9f8pjxsmaqnk2tzr.json b/tests/components/tuya/fixtures/hjjcy_9f8pjxsmaqnk2tzr.json new file mode 100644 index 00000000000..e5ff96a8dd1 --- /dev/null +++ b/tests/components/tuya/fixtures/hjjcy_9f8pjxsmaqnk2tzr.json @@ -0,0 +1,334 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "MT15/MT29", + "category": "hjjcy", + "product_id": "9f8pjxsmaqnk2tzr", + "product_name": "MT15/MT29", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2025-11-16T00:36:54+00:00", + "create_time": "2025-11-16T00:36:54+00:00", + "update_time": "2025-11-16T00:36:54+00:00", + "function": { + "alarm_volume": { + "type": "Enum", + "value": { + "range": ["low", "middle", "high", "mute"] + } + } + }, + "status_range": { + "air_quality_index": { + "type": "Enum", + "value": { + "range": ["level_1", "level_2", "level_3"] + } + }, + "temp_current": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -400, + "max": 2000, + "scale": 0, + "step": 1 + } + }, + "humidity_value": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + } + }, + "co2_value": { + "type": "Integer", + "value": { + "unit": "ppm", + "min": 0, + "max": 10000, + "scale": 0, + "step": 1 + } + }, + "ch2o_value": { + "type": "Integer", + "value": { + "unit": "mg/m┬│", + "min": 0, + "max": 9999, + "scale": 3, + "step": 1 + } + }, + "pm25_value": { + "type": "Integer", + "value": { + "unit": "ug/m┬│", + "min": 0, + "max": 999, + "scale": 0, + "step": 1 + } + }, + "pm1": { + "type": "Integer", + "value": { + "unit": "ug/m┬│", + "min": 0, + "max": 999, + "scale": 0, + "step": 1 + } + }, + "pm10": { + "type": "Integer", + "value": { + "unit": "ug/m┬│", + "min": 0, + "max": 999, + "scale": 0, + "step": 1 + } + }, + "battery_percentage": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "charge_state": { + "type": "Boolean", + "value": {} + }, + "alarm_volume": { + "type": "Enum", + "value": { + "range": ["low", "middle", "high", "mute"] + } + } + }, + "status": { + "air_quality_index": "level_1", + "temp_current": 27, + "humidity_value": 68, + "co2_value": 439, + "ch2o_value": 1, + "pm25_value": 11, + "pm1": 12, + "pm10": 15, + "battery_percentage": 100, + "charge_state": true, + "alarm_volume": "middle" + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "air_quality_index", + "config_item": { + "statusFormat": { + "air_quality_index": "$" + }, + "valueDesc": { + "range": ["level_1", "level_2", "level_3"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "2": { + "value_convert": "default", + "status_code": "temp_current", + "config_item": { + "statusFormat": { + "temp_current": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": -400, + "max": 2000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "3": { + "value_convert": "default", + "status_code": "humidity_value", + "config_item": { + "statusFormat": { + "humidity_value": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 1000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "4": { + "value_convert": "default", + "status_code": "co2_value", + "config_item": { + "statusFormat": { + "co2_value": "$" + }, + "valueDesc": { + "unit": "ppm", + "min": 0, + "max": 10000, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "5": { + "value_convert": "default", + "status_code": "ch2o_value", + "config_item": { + "statusFormat": { + "ch2o_value": "$" + }, + "valueDesc": { + "unit": "mg/m┬│", + "min": 0, + "max": 9999, + "scale": 3, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "7": { + "value_convert": "default", + "status_code": "pm25_value", + "config_item": { + "statusFormat": { + "pm25_value": "$" + }, + "valueDesc": { + "unit": "ug/m┬│", + "min": 0, + "max": 999, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "8": { + "value_convert": "default", + "status_code": "pm1", + "config_item": { + "statusFormat": { + "pm1": "$" + }, + "valueDesc": { + "unit": "ug/m┬│", + "min": 0, + "max": 999, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "9": { + "value_convert": "default", + "status_code": "pm10", + "config_item": { + "statusFormat": { + "pm10": "$" + }, + "valueDesc": { + "unit": "ug/m┬│", + "min": 0, + "max": 999, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "22": { + "value_convert": "default", + "status_code": "battery_percentage", + "config_item": { + "statusFormat": { + "battery_percentage": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "23": { + "value_convert": "default", + "status_code": "charge_state", + "config_item": { + "statusFormat": { + "charge_state": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + }, + "28": { + "value_convert": "default", + "status_code": "alarm_volume", + "config_item": { + "statusFormat": { + "alarm_volume": "$" + }, + "valueDesc": { + "range": ["low", "middle", "high", "mute"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "9f8pjxsmaqnk2tzr" + } + } + } +} diff --git a/tests/components/tuya/fixtures/infrared_ac_47peys.json b/tests/components/tuya/fixtures/infrared_ac_47peys.json new file mode 100644 index 00000000000..1358f4794b5 --- /dev/null +++ b/tests/components/tuya/fixtures/infrared_ac_47peys.json @@ -0,0 +1,96 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Ar", + "category": "infrared_ac", + "product_id": "47peys", + "product_name": "Air Conditioner", + "online": true, + "sub": true, + "time_zone": "-03:00", + "active_time": "2025-11-16T18:17:37+00:00", + "create_time": "2025-11-16T18:17:37+00:00", + "update_time": "2025-11-16T18:17:37+00:00", + "function": { + "F": { + "type": "ENUM", + "value": { + "min": 0, + "max": 3, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "M": { + "type": "ENUM", + "value": { + "min": 0, + "max": 4, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "PowerOff": { + "type": "STRING", + "value": "PowerOff" + }, + "PowerOn": { + "type": "STRING", + "value": "PowerOn" + }, + "T": { + "type": "ENUM", + "value": { + "min": 16, + "max": 30, + "scale": 0, + "step": 1, + "type": "Integer" + } + } + }, + "status_range": { + "wind": { + "type": "ENUM", + "value": { + "min": 0, + "max": 3, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "mode": { + "type": "ENUM", + "value": { + "min": 0, + "max": 4, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "power": { + "type": "BOOLEAN", + "value": {} + }, + "temp": { + "type": "ENUM", + "value": { + "min": 16, + "max": 30, + "scale": 0, + "step": 1, + "type": "Integer" + } + } + }, + "status": {}, + "set_up": false, + "support_local": false, + "local_strategy": {} +} diff --git a/tests/components/tuya/fixtures/infrared_ac_qzktzhehinzsz2je.json b/tests/components/tuya/fixtures/infrared_ac_qzktzhehinzsz2je.json new file mode 100644 index 00000000000..b96be7948bd --- /dev/null +++ b/tests/components/tuya/fixtures/infrared_ac_qzktzhehinzsz2je.json @@ -0,0 +1,96 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Air", + "category": "infrared_ac", + "product_id": "qzktzhehinzsz2je", + "product_name": "Air Conditioning", + "online": false, + "sub": true, + "time_zone": "-03:00", + "active_time": "2025-11-16T23:22:07+00:00", + "create_time": "2025-11-16T23:22:07+00:00", + "update_time": "2025-11-16T23:22:07+00:00", + "function": { + "F": { + "type": "ENUM", + "value": { + "min": 0, + "max": 3, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "M": { + "type": "ENUM", + "value": { + "min": 0, + "max": 4, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "PowerOff": { + "type": "STRING", + "value": "PowerOff" + }, + "PowerOn": { + "type": "STRING", + "value": "PowerOn" + }, + "T": { + "type": "ENUM", + "value": { + "min": 16, + "max": 30, + "scale": 0, + "step": 1, + "type": "Integer" + } + } + }, + "status_range": { + "wind": { + "type": "ENUM", + "value": { + "min": 0, + "max": 3, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "mode": { + "type": "ENUM", + "value": { + "min": 0, + "max": 4, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "power": { + "type": "BOOLEAN", + "value": {} + }, + "temp": { + "type": "ENUM", + "value": { + "min": 16, + "max": 30, + "scale": 0, + "step": 1, + "type": "Integer" + } + } + }, + "status": {}, + "set_up": false, + "support_local": false, + "local_strategy": {} +} diff --git a/tests/components/tuya/fixtures/infrared_tv_47pew0.json b/tests/components/tuya/fixtures/infrared_tv_47pew0.json new file mode 100644 index 00000000000..cb13c420d04 --- /dev/null +++ b/tests/components/tuya/fixtures/infrared_tv_47pew0.json @@ -0,0 +1,129 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "TV", + "category": "infrared_tv", + "product_id": "47pew0", + "product_name": "TV", + "online": true, + "sub": true, + "time_zone": "-03:00", + "active_time": "2025-11-16T18:13:00+00:00", + "create_time": "2025-11-16T18:13:00+00:00", + "update_time": "2025-11-16T18:13:00+00:00", + "function": { + "-/--": { + "type": "STRING", + "value": "-/--" + }, + "0": { + "type": "STRING", + "value": 0 + }, + "1": { + "type": "STRING", + "value": 1 + }, + "2": { + "type": "STRING", + "value": 2 + }, + "3": { + "type": "STRING", + "value": 3 + }, + "4": { + "type": "STRING", + "value": 4 + }, + "5": { + "type": "STRING", + "value": 5 + }, + "6": { + "type": "STRING", + "value": 6 + }, + "7": { + "type": "STRING", + "value": 7 + }, + "8": { + "type": "STRING", + "value": 8 + }, + "9": { + "type": "STRING", + "value": 9 + }, + "Back": { + "type": "STRING", + "value": "Back" + }, + "C": { + "type": "ENUM", + "value": { + "min": 1, + "max": 999, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "Channel+": { + "type": "STRING", + "value": "Channel+" + }, + "Channel-": { + "type": "STRING", + "value": "Channel-" + }, + "Down": { + "type": "STRING", + "value": "Down" + }, + "Home": { + "type": "STRING", + "value": "Home" + }, + "Left": { + "type": "STRING", + "value": "Left" + }, + "Menu": { + "type": "STRING", + "value": "Menu" + }, + "OK": { + "type": "STRING", + "value": "OK" + }, + "Power": { + "type": "STRING", + "value": "Power" + }, + "Right": { + "type": "STRING", + "value": "Right" + }, + "Up": { + "type": "STRING", + "value": "Up" + }, + "Volume+": { + "type": "STRING", + "value": "Volume+" + }, + "Volume-": { + "type": "STRING", + "value": "Volume-" + } + }, + "status_range": {}, + "status": {}, + "set_up": false, + "support_local": false, + "local_strategy": {} +} diff --git a/tests/components/tuya/fixtures/infrared_tv_lplun31mo1xaonwz.json b/tests/components/tuya/fixtures/infrared_tv_lplun31mo1xaonwz.json new file mode 100644 index 00000000000..a5c245617d7 --- /dev/null +++ b/tests/components/tuya/fixtures/infrared_tv_lplun31mo1xaonwz.json @@ -0,0 +1,129 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "TV", + "category": "infrared_tv", + "product_id": "lplun31mo1xaonwz", + "product_name": "TV", + "online": false, + "sub": true, + "time_zone": "-03:00", + "active_time": "2025-11-16T23:20:17+00:00", + "create_time": "2025-11-16T23:20:17+00:00", + "update_time": "2025-11-16T23:20:17+00:00", + "function": { + "-/--": { + "type": "STRING", + "value": "-/--" + }, + "0": { + "type": "STRING", + "value": 0 + }, + "1": { + "type": "STRING", + "value": 1 + }, + "2": { + "type": "STRING", + "value": 2 + }, + "3": { + "type": "STRING", + "value": 3 + }, + "4": { + "type": "STRING", + "value": 4 + }, + "5": { + "type": "STRING", + "value": 5 + }, + "6": { + "type": "STRING", + "value": 6 + }, + "7": { + "type": "STRING", + "value": 7 + }, + "8": { + "type": "STRING", + "value": 8 + }, + "9": { + "type": "STRING", + "value": 9 + }, + "Back": { + "type": "STRING", + "value": "Back" + }, + "C": { + "type": "ENUM", + "value": { + "min": 1, + "max": 999, + "scale": 0, + "step": 1, + "type": "Integer" + } + }, + "Channel+": { + "type": "STRING", + "value": "Channel+" + }, + "Channel-": { + "type": "STRING", + "value": "Channel-" + }, + "Down": { + "type": "STRING", + "value": "Down" + }, + "Home": { + "type": "STRING", + "value": "Home" + }, + "Left": { + "type": "STRING", + "value": "Left" + }, + "Menu": { + "type": "STRING", + "value": "Menu" + }, + "OK": { + "type": "STRING", + "value": "OK" + }, + "Power": { + "type": "STRING", + "value": "Power" + }, + "Right": { + "type": "STRING", + "value": "Right" + }, + "Up": { + "type": "STRING", + "value": "Up" + }, + "Volume+": { + "type": "STRING", + "value": "Volume+" + }, + "Volume-": { + "type": "STRING", + "value": "Volume-" + } + }, + "status_range": {}, + "status": {}, + "set_up": false, + "support_local": false, + "local_strategy": {} +} diff --git a/tests/components/tuya/fixtures/pir_o1l76njefmksbgkk.json b/tests/components/tuya/fixtures/pir_o1l76njefmksbgkk.json new file mode 100644 index 00000000000..ddfdaae73e2 --- /dev/null +++ b/tests/components/tuya/fixtures/pir_o1l76njefmksbgkk.json @@ -0,0 +1,77 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "PIR", + "category": "pir", + "product_id": "o1l76njefmksbgkk", + "product_name": "PIR", + "online": false, + "sub": false, + "time_zone": "-03:00", + "active_time": "2025-09-27T22:49:06+00:00", + "create_time": "2025-09-27T22:49:06+00:00", + "update_time": "2025-09-27T22:49:06+00:00", + "function": {}, + "status_range": { + "pir": { + "type": "Enum", + "value": { + "range": ["pir", "none"] + } + }, + "battery_percentage": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "pir": "pir", + "battery_percentage": 100 + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "pir", + "config_item": { + "statusFormat": { + "pir": "$" + }, + "valueDesc": { + "range": ["pir", "none"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "o1l76njefmksbgkk" + } + }, + "4": { + "value_convert": "default", + "status_code": "battery_percentage", + "config_item": { + "statusFormat": { + "battery_percentage": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "o1l76njefmksbgkk" + } + } + } +} diff --git a/tests/components/tuya/fixtures/tdq_1ctrc5jx88mtdh9w.json b/tests/components/tuya/fixtures/tdq_1ctrc5jx88mtdh9w.json new file mode 100644 index 00000000000..f9bd83e3962 --- /dev/null +++ b/tests/components/tuya/fixtures/tdq_1ctrc5jx88mtdh9w.json @@ -0,0 +1,303 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Puerta Casa ", + "category": "tdq", + "product_id": "1ctrc5jx88mtdh9w", + "product_name": "WiFi Breaker", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2023-12-17T14:43:05+00:00", + "create_time": "2023-12-17T14:43:05+00:00", + "update_time": "2023-12-17T14:43:05+00:00", + "function": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "relay_status": { + "type": "Enum", + "value": { + "range": ["0", "1", "2"] + } + }, + "random_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "cycle_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_inching": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_type": { + "type": "Enum", + "value": { + "range": ["flip", "sync", "button"] + } + } + }, + "status_range": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "test_bit": { + "type": "Integer", + "value": { + "min": 0, + "max": 5, + "scale": 0, + "step": 1 + } + }, + "fault": { + "type": "Bitmap", + "value": { + "label": ["ov_cr", "ov_vol", "ov_pwr", "ls_cr", "ls_vol", "ls_pow"] + } + }, + "relay_status": { + "type": "Enum", + "value": { + "range": ["0", "1", "2"] + } + }, + "random_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "cycle_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_inching": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_type": { + "type": "Enum", + "value": { + "range": ["flip", "sync", "button"] + } + } + }, + "status": { + "switch_1": false, + "countdown_1": 0, + "test_bit": 0, + "fault": 0, + "relay_status": "0", + "random_time": "", + "cycle_time": "", + "switch_inching": "AQAB", + "switch_type": "flip" + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "switch_1", + "config_item": { + "statusFormat": { + "switch_1": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "9": { + "value_convert": "default", + "status_code": "countdown_1", + "config_item": { + "statusFormat": { + "countdown_1": "$" + }, + "valueDesc": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "24": { + "value_convert": "default", + "status_code": "test_bit", + "config_item": { + "statusFormat": { + "test_bit": "$" + }, + "valueDesc": { + "min": 0, + "max": 5, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "29": { + "value_convert": "default", + "status_code": "fault", + "config_item": { + "statusFormat": { + "fault": "$" + }, + "valueDesc": { + "label": ["ov_cr", "ov_vol", "ov_pwr", "ls_cr", "ls_vol", "ls_pow"] + }, + "valueType": "Bitmap", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "38": { + "value_convert": "enum", + "status_code": "relay_status", + "config_item": { + "statusFormat": { + "relay_status": "$" + }, + "valueDesc": { + "range": ["0", "1", "2"] + }, + "valueType": "Enum", + "enumMappingMap": { + "0": { + "code": "relay_status", + "value": "0" + }, + "1": { + "code": "relay_status", + "value": "1" + }, + "2": { + "code": "relay_status", + "value": "2" + }, + "memory": { + "code": "relay_status", + "value": "2" + }, + "off": { + "code": "relay_status", + "value": "0" + }, + "on": { + "code": "relay_status", + "value": "1" + } + }, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "42": { + "value_convert": "default", + "status_code": "random_time", + "config_item": { + "statusFormat": { + "random_time": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "43": { + "value_convert": "default", + "status_code": "cycle_time", + "config_item": { + "statusFormat": { + "cycle_time": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "44": { + "value_convert": "default", + "status_code": "switch_inching", + "config_item": { + "statusFormat": { + "switch_inching": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + }, + "47": { + "value_convert": "default", + "status_code": "switch_type", + "config_item": { + "statusFormat": { + "switch_type": "$" + }, + "valueDesc": { + "range": ["flip", "sync", "button"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "1ctrc5jx88mtdh9w" + } + } + } +} diff --git a/tests/components/tuya/fixtures/tdq_emb5khohohihmbxc.json b/tests/components/tuya/fixtures/tdq_emb5khohohihmbxc.json new file mode 100644 index 00000000000..7c8a83aee8b --- /dev/null +++ b/tests/components/tuya/fixtures/tdq_emb5khohohihmbxc.json @@ -0,0 +1,303 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Server Fan", + "category": "tdq", + "product_id": "emb5khohohihmbxc", + "product_name": "WiFi Breaker", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2024-01-17T20:15:39+00:00", + "create_time": "2024-01-17T20:15:39+00:00", + "update_time": "2024-01-17T20:15:39+00:00", + "function": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "relay_status": { + "type": "Enum", + "value": { + "range": ["0", "1", "2"] + } + }, + "random_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "cycle_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_inching": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_type": { + "type": "Enum", + "value": { + "range": ["flip", "sync", "button"] + } + } + }, + "status_range": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "test_bit": { + "type": "Integer", + "value": { + "min": 0, + "max": 5, + "scale": 0, + "step": 1 + } + }, + "fault": { + "type": "Bitmap", + "value": { + "label": ["ov_cr", "ov_vol", "ov_pwr", "ls_cr", "ls_vol", "ls_pow"] + } + }, + "relay_status": { + "type": "Enum", + "value": { + "range": ["0", "1", "2"] + } + }, + "random_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "cycle_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_inching": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_type": { + "type": "Enum", + "value": { + "range": ["flip", "sync", "button"] + } + } + }, + "status": { + "switch_1": true, + "countdown_1": 0, + "test_bit": 0, + "fault": 0, + "relay_status": "2", + "random_time": "", + "cycle_time": "", + "switch_inching": "AAAC", + "switch_type": "flip" + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "switch_1", + "config_item": { + "statusFormat": { + "switch_1": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + }, + "9": { + "value_convert": "default", + "status_code": "countdown_1", + "config_item": { + "statusFormat": { + "countdown_1": "$" + }, + "valueDesc": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + }, + "24": { + "value_convert": "default", + "status_code": "test_bit", + "config_item": { + "statusFormat": { + "test_bit": "$" + }, + "valueDesc": { + "min": 0, + "max": 5, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + }, + "29": { + "value_convert": "default", + "status_code": "fault", + "config_item": { + "statusFormat": { + "fault": "$" + }, + "valueDesc": { + "label": ["ov_cr", "ov_vol", "ov_pwr", "ls_cr", "ls_vol", "ls_pow"] + }, + "valueType": "Bitmap", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + }, + "38": { + "value_convert": "enum", + "status_code": "relay_status", + "config_item": { + "statusFormat": { + "relay_status": "$" + }, + "valueDesc": { + "range": ["0", "1", "2"] + }, + "valueType": "Enum", + "enumMappingMap": { + "0": { + "code": "relay_status", + "value": "0" + }, + "1": { + "code": "relay_status", + "value": "1" + }, + "2": { + "code": "relay_status", + "value": "2" + }, + "memory": { + "code": "relay_status", + "value": "2" + }, + "off": { + "code": "relay_status", + "value": "0" + }, + "on": { + "code": "relay_status", + "value": "1" + } + }, + "pid": "emb5khohohihmbxc" + } + }, + "42": { + "value_convert": "default", + "status_code": "random_time", + "config_item": { + "statusFormat": { + "random_time": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + }, + "43": { + "value_convert": "default", + "status_code": "cycle_time", + "config_item": { + "statusFormat": { + "cycle_time": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + }, + "44": { + "value_convert": "default", + "status_code": "switch_inching", + "config_item": { + "statusFormat": { + "switch_inching": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + }, + "47": { + "value_convert": "default", + "status_code": "switch_type", + "config_item": { + "statusFormat": { + "switch_type": "$" + }, + "valueDesc": { + "range": ["flip", "sync", "button"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "emb5khohohihmbxc" + } + } + } +} diff --git a/tests/components/tuya/fixtures/tdq_gdknjvdpiwoq6smx.json b/tests/components/tuya/fixtures/tdq_gdknjvdpiwoq6smx.json new file mode 100644 index 00000000000..6ad3f92e8ad --- /dev/null +++ b/tests/components/tuya/fixtures/tdq_gdknjvdpiwoq6smx.json @@ -0,0 +1,253 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Jardim frontal ", + "category": "tdq", + "product_id": "gdknjvdpiwoq6smx", + "product_name": "Smart Switch Module", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2023-05-09T18:26:02+00:00", + "create_time": "2023-05-09T18:26:02+00:00", + "update_time": "2023-05-09T18:26:02+00:00", + "function": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "relay_status": { + "type": "Enum", + "value": { + "range": ["0", "1", "2"] + } + }, + "random_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "cycle_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_inching": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_type": { + "type": "Enum", + "value": { + "range": ["flip", "sync", "button"] + } + } + }, + "status_range": { + "switch_1": { + "type": "Boolean", + "value": {} + }, + "countdown_1": { + "type": "Integer", + "value": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + } + }, + "relay_status": { + "type": "Enum", + "value": { + "range": ["0", "1", "2"] + } + }, + "random_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "cycle_time": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_inching": { + "type": "String", + "value": { + "maxlen": 255 + } + }, + "switch_type": { + "type": "Enum", + "value": { + "range": ["flip", "sync", "button"] + } + } + }, + "status": { + "switch_1": false, + "countdown_1": 0, + "relay_status": "0", + "random_time": "", + "cycle_time": "AX8BaAP8AAEAgg==", + "switch_inching": "", + "switch_type": "flip" + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "switch_1", + "config_item": { + "statusFormat": { + "switch_1": "$" + }, + "valueDesc": {}, + "valueType": "Boolean", + "enumMappingMap": {}, + "pid": "gdknjvdpiwoq6smx" + } + }, + "9": { + "value_convert": "default", + "status_code": "countdown_1", + "config_item": { + "statusFormat": { + "countdown_1": "$" + }, + "valueDesc": { + "unit": "s", + "min": 0, + "max": 86400, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "gdknjvdpiwoq6smx" + } + }, + "38": { + "value_convert": "enum", + "status_code": "relay_status", + "config_item": { + "statusFormat": { + "relay_status": "$" + }, + "valueDesc": { + "range": ["0", "1", "2"] + }, + "valueType": "Enum", + "enumMappingMap": { + "0": { + "code": "relay_status", + "value": "0" + }, + "1": { + "code": "relay_status", + "value": "1" + }, + "2": { + "code": "relay_status", + "value": "2" + }, + "memory": { + "code": "relay_status", + "value": "2" + }, + "off": { + "code": "relay_status", + "value": "0" + }, + "on": { + "code": "relay_status", + "value": "1" + } + }, + "pid": "gdknjvdpiwoq6smx" + } + }, + "42": { + "value_convert": "default", + "status_code": "random_time", + "config_item": { + "statusFormat": { + "random_time": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "gdknjvdpiwoq6smx" + } + }, + "43": { + "value_convert": "default", + "status_code": "cycle_time", + "config_item": { + "statusFormat": { + "cycle_time": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "gdknjvdpiwoq6smx" + } + }, + "44": { + "value_convert": "default", + "status_code": "switch_inching", + "config_item": { + "statusFormat": { + "switch_inching": "$" + }, + "valueDesc": { + "maxlen": 255 + }, + "valueType": "String", + "enumMappingMap": {}, + "pid": "gdknjvdpiwoq6smx" + } + }, + "47": { + "value_convert": "default", + "status_code": "switch_type", + "config_item": { + "statusFormat": { + "switch_type": "$" + }, + "valueDesc": { + "range": ["flip", "sync", "button"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "gdknjvdpiwoq6smx" + } + } + } +} diff --git a/tests/components/tuya/fixtures/wnykq_x0lyfgjuguuh1vof.json b/tests/components/tuya/fixtures/wnykq_x0lyfgjuguuh1vof.json new file mode 100644 index 00000000000..3c3631452c2 --- /dev/null +++ b/tests/components/tuya/fixtures/wnykq_x0lyfgjuguuh1vof.json @@ -0,0 +1,22 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Smart IR+RF Remote Control", + "category": "wnykq", + "product_id": "x0lyfgjuguuh1vof", + "product_name": "Smart IR+RF Remote Control", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2025-11-16T18:05:50+00:00", + "create_time": "2025-11-16T18:05:50+00:00", + "update_time": "2025-11-16T18:05:50+00:00", + "function": {}, + "status_range": {}, + "status": {}, + "set_up": false, + "support_local": true, + "local_strategy": {} +} diff --git a/tests/components/tuya/fixtures/wsdcg_vlzqwckk.json b/tests/components/tuya/fixtures/wsdcg_vlzqwckk.json new file mode 100644 index 00000000000..112da21b9f7 --- /dev/null +++ b/tests/components/tuya/fixtures/wsdcg_vlzqwckk.json @@ -0,0 +1,348 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Temperature Humidity Sensor abelhas pasillo", + "category": "wsdcg", + "product_id": "vlzqwckk", + "product_name": "Temperature Humidity Sensor", + "online": false, + "sub": false, + "time_zone": "-03:00", + "active_time": "2025-09-12T01:47:39+00:00", + "create_time": "2025-09-12T01:47:39+00:00", + "update_time": "2025-09-12T01:47:39+00:00", + "function": { + "temp_unit_convert": { + "type": "Enum", + "value": { + "range": ["c", "f"] + } + }, + "maxtemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "minitemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "maxhum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "minihum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "va_temperature": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "va_humidity": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "battery_percentage": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "temp_unit_convert": { + "type": "Enum", + "value": { + "range": ["c", "f"] + } + }, + "maxtemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "minitemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "maxhum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "minihum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "temp_alarm": { + "type": "Enum", + "value": { + "range": ["loweralarm", "upperalarm", "cancel"] + } + }, + "hum_alarm": { + "type": "Enum", + "value": { + "range": ["loweralarm", "upperalarm", "cancel"] + } + } + }, + "status": { + "va_temperature": 298, + "va_humidity": 45, + "battery_percentage": 100, + "temp_unit_convert": "c", + "maxtemp_set": 390, + "minitemp_set": 0, + "maxhum_set": 60, + "minihum_set": 20, + "temp_alarm": "cancel", + "hum_alarm": "upperalarm" + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "va_temperature", + "config_item": { + "statusFormat": { + "va_temperature": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "2": { + "value_convert": "default", + "status_code": "humidity_value", + "config_item": { + "statusFormat": { + "va_humidity": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "4": { + "value_convert": "default", + "status_code": "battery_percentage", + "config_item": { + "statusFormat": { + "battery_percentage": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "9": { + "value_convert": "default", + "status_code": "temp_unit_convert", + "config_item": { + "statusFormat": { + "temp_unit_convert": "$" + }, + "valueDesc": { + "range": ["c", "f"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "10": { + "value_convert": "default", + "status_code": "maxtemp_set", + "config_item": { + "statusFormat": { + "maxtemp_set": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "11": { + "value_convert": "default", + "status_code": "minitemp_set", + "config_item": { + "statusFormat": { + "minitemp_set": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "12": { + "value_convert": "default", + "status_code": "maxhum_set", + "config_item": { + "statusFormat": { + "maxhum_set": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "13": { + "value_convert": "default", + "status_code": "minihum_set", + "config_item": { + "statusFormat": { + "minihum_set": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "14": { + "value_convert": "default", + "status_code": "temp_alarm", + "config_item": { + "statusFormat": { + "temp_alarm": "$" + }, + "valueDesc": { + "range": ["loweralarm", "upperalarm", "cancel"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + }, + "15": { + "value_convert": "default", + "status_code": "hum_alarm", + "config_item": { + "statusFormat": { + "hum_alarm": "$" + }, + "valueDesc": { + "range": ["loweralarm", "upperalarm", "cancel"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "vlzqwckk" + } + } + } +} diff --git a/tests/components/tuya/fixtures/wsdcg_xflodz7oja0pndk3.json b/tests/components/tuya/fixtures/wsdcg_xflodz7oja0pndk3.json new file mode 100644 index 00000000000..0b01b35204e --- /dev/null +++ b/tests/components/tuya/fixtures/wsdcg_xflodz7oja0pndk3.json @@ -0,0 +1,428 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Sensor T & H Server Home", + "category": "wsdcg", + "product_id": "xflodz7oja0pndk3", + "product_name": "T&H Sensor", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2023-12-14T21:05:25+00:00", + "create_time": "2023-12-14T21:05:25+00:00", + "update_time": "2023-12-14T21:05:25+00:00", + "function": { + "temp_unit_convert": { + "type": "Enum", + "value": { + "range": ["c", "f"] + } + }, + "maxtemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "minitemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "maxhum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "minihum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "temp_sensitivity": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": 3, + "max": 20, + "scale": 1, + "step": 1 + } + }, + "hum_sensitivity": { + "type": "Integer", + "value": { + "unit": "%", + "min": 3, + "max": 20, + "scale": 0, + "step": 1 + } + } + }, + "status_range": { + "va_temperature": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "va_humidity": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "battery_percentage": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "temp_unit_convert": { + "type": "Enum", + "value": { + "range": ["c", "f"] + } + }, + "maxtemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "minitemp_set": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + } + }, + "maxhum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "minihum_set": { + "type": "Integer", + "value": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + } + }, + "temp_alarm": { + "type": "Enum", + "value": { + "range": ["loweralarm", "upperalarm", "cancel"] + } + }, + "hum_alarm": { + "type": "Enum", + "value": { + "range": ["loweralarm", "upperalarm", "cancel"] + } + }, + "temp_sensitivity": { + "type": "Integer", + "value": { + "unit": "Ôäâ", + "min": 3, + "max": 20, + "scale": 1, + "step": 1 + } + }, + "hum_sensitivity": { + "type": "Integer", + "value": { + "unit": "%", + "min": 3, + "max": 20, + "scale": 0, + "step": 1 + } + } + }, + "status": { + "va_temperature": 327, + "va_humidity": 50, + "battery_percentage": 100, + "temp_unit_convert": "c", + "maxtemp_set": 390, + "minitemp_set": 0, + "maxhum_set": 82, + "minihum_set": 20, + "temp_alarm": "cancel", + "hum_alarm": "loweralarm", + "temp_sensitivity": 6, + "hum_sensitivity": 6 + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "va_temperature", + "config_item": { + "statusFormat": { + "va_temperature": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "2": { + "value_convert": "default", + "status_code": "humidity_value", + "config_item": { + "statusFormat": { + "va_humidity": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "4": { + "value_convert": "default", + "status_code": "battery_percentage", + "config_item": { + "statusFormat": { + "battery_percentage": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "9": { + "value_convert": "default", + "status_code": "temp_unit_convert", + "config_item": { + "statusFormat": { + "temp_unit_convert": "$" + }, + "valueDesc": { + "range": ["c", "f"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "10": { + "value_convert": "default", + "status_code": "maxtemp_set", + "config_item": { + "statusFormat": { + "maxtemp_set": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "11": { + "value_convert": "default", + "status_code": "minitemp_set", + "config_item": { + "statusFormat": { + "minitemp_set": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": -200, + "max": 600, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "12": { + "value_convert": "default", + "status_code": "maxhum_set", + "config_item": { + "statusFormat": { + "maxhum_set": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "13": { + "value_convert": "default", + "status_code": "minihum_set", + "config_item": { + "statusFormat": { + "minihum_set": "$" + }, + "valueDesc": { + "unit": "%", + "min": 0, + "max": 100, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "14": { + "value_convert": "default", + "status_code": "temp_alarm", + "config_item": { + "statusFormat": { + "temp_alarm": "$" + }, + "valueDesc": { + "range": ["loweralarm", "upperalarm", "cancel"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "15": { + "value_convert": "default", + "status_code": "hum_alarm", + "config_item": { + "statusFormat": { + "hum_alarm": "$" + }, + "valueDesc": { + "range": ["loweralarm", "upperalarm", "cancel"] + }, + "valueType": "Enum", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "19": { + "value_convert": "default", + "status_code": "temp_sensitivity", + "config_item": { + "statusFormat": { + "temp_sensitivity": "$" + }, + "valueDesc": { + "unit": "Ôäâ", + "min": 3, + "max": 20, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + }, + "20": { + "value_convert": "default", + "status_code": "hum_sensitivity", + "config_item": { + "statusFormat": { + "hum_sensitivity": "$" + }, + "valueDesc": { + "unit": "%", + "min": 3, + "max": 20, + "scale": 0, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "xflodz7oja0pndk3" + } + } + } +} diff --git a/tests/components/tuya/fixtures/wsdykq_ay30hrndaogxclh0.json b/tests/components/tuya/fixtures/wsdykq_ay30hrndaogxclh0.json new file mode 100644 index 00000000000..3d92f867fce --- /dev/null +++ b/tests/components/tuya/fixtures/wsdykq_ay30hrndaogxclh0.json @@ -0,0 +1,22 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "LCDÕ▒ŵ©®µ╣┐Õ║ªõ©çÞâ¢ÚüѵĺÕÖ¿", + "category": "wsdykq", + "product_id": "ay30hrndaogxclh0", + "product_name": "LCDÕ▒ŵ©®µ╣┐Õ║ªõ©çÞâ¢ÚüѵĺÕÖ¿", + "online": false, + "sub": false, + "time_zone": "-03:00", + "active_time": "2025-11-16T17:28:06+00:00", + "create_time": "2025-11-16T17:28:06+00:00", + "update_time": "2025-11-16T17:28:06+00:00", + "function": {}, + "status_range": {}, + "status": {}, + "set_up": false, + "support_local": true, + "local_strategy": {} +} diff --git a/tests/components/tuya/fixtures/zndb_gqmmtjclqb7reg5p.json b/tests/components/tuya/fixtures/zndb_gqmmtjclqb7reg5p.json new file mode 100644 index 00000000000..88c87f7d31c --- /dev/null +++ b/tests/components/tuya/fixtures/zndb_gqmmtjclqb7reg5p.json @@ -0,0 +1,22 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "Wi-Fi Meter(Bi-Directional)", + "category": "zndb", + "product_id": "gqmmtjclqb7reg5p", + "product_name": "PC321-W-TY(Bi-Directional)", + "online": true, + "sub": false, + "time_zone": "-03:00", + "active_time": "2025-08-07T20:27:09+00:00", + "create_time": "2025-08-07T20:27:09+00:00", + "update_time": "2025-08-07T20:27:09+00:00", + "function": {}, + "status_range": {}, + "status": {}, + "set_up": false, + "support_local": true, + "local_strategy": {} +} diff --git a/tests/components/tuya/fixtures/zndb_z95s7p3z54xbsjnl.json b/tests/components/tuya/fixtures/zndb_z95s7p3z54xbsjnl.json new file mode 100644 index 00000000000..ccc333855ff --- /dev/null +++ b/tests/components/tuya/fixtures/zndb_z95s7p3z54xbsjnl.json @@ -0,0 +1,136 @@ +{ + "endpoint": "https://apigw.tuyaus.com", + "mqtt_connected": true, + "disabled_by": null, + "disabled_polling": false, + "name": "WIFI Dual Meter", + "category": "zndb", + "product_id": "z95s7p3z54xbsjnl", + "product_name": "WIFI Dual Meter", + "online": false, + "sub": false, + "time_zone": "-03:00", + "active_time": "2024-10-08T14:10:35+00:00", + "create_time": "2024-10-08T14:10:35+00:00", + "update_time": "2024-10-08T14:10:35+00:00", + "function": { + "forward_energy_total": { + "type": "Integer", + "value": { + "unit": "KWH", + "min": 0, + "max": 99999999, + "scale": 2, + "step": 1 + } + }, + "reverse_energy_total": { + "type": "Integer", + "value": { + "unit": "KWH", + "min": 0, + "max": 99999999, + "scale": 2, + "step": 1 + } + } + }, + "status_range": { + "forward_energy_total": { + "type": "Integer", + "value": { + "unit": "KWH", + "min": 0, + "max": 99999999, + "scale": 2, + "step": 1 + } + }, + "reverse_energy_total": { + "type": "Integer", + "value": { + "unit": "KWH", + "min": 0, + "max": 99999999, + "scale": 2, + "step": 1 + } + }, + "total_power": { + "type": "Integer", + "value": { + "unit": "W", + "min": -99999999, + "max": 99999999, + "scale": 1, + "step": 1 + } + } + }, + "status": { + "forward_energy_total": 259939, + "reverse_energy_total": 200008, + "total_power": -4095 + }, + "set_up": true, + "support_local": true, + "local_strategy": { + "1": { + "value_convert": "default", + "status_code": "forward_energy_total", + "config_item": { + "statusFormat": { + "forward_energy_total": "$" + }, + "valueDesc": { + "unit": "KWH", + "min": 0, + "max": 99999999, + "scale": 2, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "z95s7p3z54xbsjnl" + } + }, + "2": { + "value_convert": "default", + "status_code": "reverse_energy_total", + "config_item": { + "statusFormat": { + "reverse_energy_total": "$" + }, + "valueDesc": { + "unit": "KWH", + "min": 0, + "max": 99999999, + "scale": 2, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "z95s7p3z54xbsjnl" + } + }, + "115": { + "value_convert": "default", + "status_code": "total_power", + "config_item": { + "statusFormat": { + "total_power": "$" + }, + "valueDesc": { + "unit": "W", + "min": -99999999, + "max": 99999999, + "scale": 1, + "step": 1 + }, + "valueType": "Integer", + "enumMappingMap": {}, + "pid": "z95s7p3z54xbsjnl" + } + } + } +} diff --git a/tests/components/tuya/snapshots/test_binary_sensor.ambr b/tests/components/tuya/snapshots/test_binary_sensor.ambr index e0a0315d0e0..82004e81c4f 100644 --- a/tests/components/tuya/snapshots/test_binary_sensor.ambr +++ b/tests/components/tuya/snapshots/test_binary_sensor.ambr @@ -1098,6 +1098,56 @@ 'state': 'unavailable', }) # --- +# name: test_platform_setup_and_discovery[binary_sensor.pir_motion-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.pir_motion', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Motion', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Motion', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.kkgbskmfejn67l1orippir', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[binary_sensor.pir_motion-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'motion', + 'friendly_name': 'PIR Motion', + }), + 'context': , + 'entity_id': 'binary_sensor.pir_motion', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_platform_setup_and_discovery[binary_sensor.pir_outside_stairs_motion-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index 66c647b2b01..f048c1399a2 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -1,4 +1,35 @@ # serializer version: 1 +# name: test_device_registry[0hlcxgoadnrh03yaqkydsw] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + '0hlcxgoadnrh03yaqkydsw', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'LCDÕ▒ŵ©®µ╣┐Õ║ªõ©çÞâ¢ÚüѵĺÕÖ¿ (unsupported)', + 'model_id': 'ay30hrndaogxclh0', + 'name': 'LCDÕ▒ŵ©®µ╣┐Õ║ªõ©çÞâ¢ÚüѵĺÕÖ¿', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[0qtza8cv6q5rdxpxgcdsw] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -30,6 +61,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[0wep74vtderarfni] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + '0wep74vtderarfni', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'TV (unsupported)', + 'model_id': '47pew0', + 'name': 'TV', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[18yvbamhgkjc] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -278,6 +340,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[3kdnp0ajo7zdolfxgcdsw] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + '3kdnp0ajo7zdolfxgcdsw', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'T&H Sensor', + 'model_id': 'xflodz7oja0pndk3', + 'name': 'Sensor T & H Server Home', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[3phkffywh5nnlj5vbdnz] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -1921,6 +2014,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[a6ugbo3of3hqf4jojd] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'a6ugbo3of3hqf4jojd', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Lampada Wi-Fi+bluetooth', + 'model_id': 'oj4fqh3fo3obgu6a', + 'name': 'L├ímpara Ati', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[aa99hccfnzvypr3zjsywc] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -2913,6 +3037,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[cxbmhihohohk5bmeqdt] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'cxbmhihohohk5bmeqdt', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'WiFi Breaker', + 'model_id': 'emb5khohohihmbxc', + 'name': 'Server Fan', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[dBFBdywk9gTihUQmzc] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -3161,6 +3316,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[ej2zsznihehztkzqcaderarfni] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'ej2zsznihehztkzqcaderarfni', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Air Conditioning (unsupported)', + 'model_id': 'qzktzhehinzsz2je', + 'name': 'Air', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[eway2kw92ncuecarzc] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -3409,6 +3595,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[fov1huugujgfyl0xqkynw] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'fov1huugujgfyl0xqkynw', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart IR+RF Remote Control (unsupported)', + 'model_id': 'x0lyfgjuguuh1vof', + 'name': 'Smart IR+RF Remote Control', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[ftvxinxevpy21tbelc] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -4990,6 +5207,68 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[kkcwqzlvgcdsw] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'kkcwqzlvgcdsw', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Temperature Humidity Sensor', + 'model_id': 'vlzqwckk', + 'name': 'Temperature Humidity Sensor abelhas pasillo', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- +# name: test_device_registry[kkgbskmfejn67l1orip] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'kkgbskmfejn67l1orip', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'PIR', + 'model_id': 'o1l76njefmksbgkk', + 'name': 'PIR', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[klgxmpwvdhw7tzs8jd] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -5300,6 +5579,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[lnjsbx45z3p7s59zbdnz] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'lnjsbx45z3p7s59zbdnz', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'WIFI Dual Meter', + 'model_id': 'z95s7p3z54xbsjnl', + 'name': 'WIFI Dual Meter', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[mgcpxpmovasazerdps] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -5982,6 +6292,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[oxi73pj9a0ubr60pjd] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'oxi73pj9a0ubr60pjd', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'JRBULB', + 'model_id': 'p06rbu0a9jp37ixo', + 'name': 'Jardim Casa', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[p2gnclbiqxrbboagdd] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -6013,6 +6354,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[p5ger7bqlcjtmmqgbdnz] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'p5ger7bqlcjtmmqgbdnz', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'PC321-W-TY(Bi-Directional) (unsupported)', + 'model_id': 'gqmmtjclqb7reg5p', + 'name': 'Wi-Fi Meter(Bi-Directional)', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[p8xoxccrjbwy] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -6106,6 +6478,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[pdnimgsb3w0xko3kjd] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'pdnimgsb3w0xko3kjd', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart Bulb', + 'model_id': 'k3okx0w3bsgmindp', + 'name': 'Portal Casa Carro Jalimy', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[pfhwb1v3i7cifa2tcp] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -6850,6 +7253,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[rzt2knqamsxjp8f9ycjjh] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'rzt2knqamsxjp8f9ycjjh', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'MT15/MT29', + 'model_id': '9f8pjxsmaqnk2tzr', + 'name': 'MT15/MT29', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[s3zzjdcfrip] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -7315,6 +7749,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[syep74caderarfni] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'syep74caderarfni', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Air Conditioner (unsupported)', + 'model_id': '47peys', + 'name': 'Ar', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[t5zosev6h6wmwyrajbwy] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -8059,6 +8524,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[w9hdtm88xj5crtc1qdt] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'w9hdtm88xj5crtc1qdt', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'WiFi Breaker', + 'model_id': '1ctrc5jx88mtdh9w', + 'name': 'Puerta Casa ', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[wc6mumew8inrivi9zc] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -8245,6 +8741,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[xms6qowipdvjnkdgqdt] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'xms6qowipdvjnkdgqdt', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'Smart Switch Module', + 'model_id': 'gdknjvdpiwoq6smx', + 'name': 'Jardim frontal ', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[y1dkg3disbacmqfyjd] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -8834,6 +9361,37 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[zwnoax1om13nulplvtderarfni] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'zwnoax1om13nulplvtderarfni', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Tuya', + 'model': 'TV (unsupported)', + 'model_id': 'lplun31mo1xaonwz', + 'name': 'TV', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_device_registry[zyutbek7wdm1b4cgzckw] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/tuya/snapshots/test_light.ambr b/tests/components/tuya/snapshots/test_light.ambr index 1c7bfafe1bb..bbb7d2e31dc 100644 --- a/tests/components/tuya/snapshots/test_light.ambr +++ b/tests/components/tuya/snapshots/test_light.ambr @@ -1853,6 +1853,73 @@ 'state': 'on', }) # --- +# name: test_platform_setup_and_discovery[light.jardim_casa-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([ + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'light', + 'entity_category': None, + 'entity_id': 'light.jardim_casa', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 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.oxi73pj9a0ubr60pjdswitch_led', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[light.jardim_casa-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Jardim Casa', + 'max_color_temp_kelvin': 6500, + 'max_mireds': 500, + 'min_color_temp_kelvin': 2000, + 'min_mireds': 153, + 'supported_color_modes': list([ + , + , + ]), + 'supported_features': , + }), + 'context': , + 'entity_id': 'light.jardim_casa', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_platform_setup_and_discovery[light.kattenbak_light-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -1911,6 +1978,80 @@ 'state': 'off', }) # --- +# name: test_platform_setup_and_discovery[light.l_impara_ati-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([ + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'light', + 'entity_category': None, + 'entity_id': 'light.l_impara_ati', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 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.a6ugbo3of3hqf4jojdswitch_led', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[light.l_impara_ati-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'brightness': None, + 'color_mode': None, + 'color_temp': None, + 'color_temp_kelvin': None, + 'friendly_name': 'L├ímpara Ati', + 'hs_color': None, + 'max_color_temp_kelvin': 6500, + 'max_mireds': 500, + 'min_color_temp_kelvin': 2000, + 'min_mireds': 153, + 'rgb_color': None, + 'supported_color_modes': list([ + , + , + ]), + 'supported_features': , + 'xy_color': None, + }), + 'context': , + 'entity_id': 'light.l_impara_ati', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[light.landing-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -2894,6 +3035,73 @@ 'state': 'off', }) # --- +# name: test_platform_setup_and_discovery[light.portal_casa_carro_jalimy-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([ + , + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'light', + 'entity_category': None, + 'entity_id': 'light.portal_casa_carro_jalimy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 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.pdnimgsb3w0xko3kjdswitch_led', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[light.portal_casa_carro_jalimy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Portal Casa Carro Jalimy', + 'max_color_temp_kelvin': 6500, + 'max_mireds': 500, + 'min_color_temp_kelvin': 2000, + 'min_mireds': 153, + 'supported_color_modes': list([ + , + , + ]), + 'supported_features': , + }), + 'context': , + 'entity_id': 'light.portal_casa_carro_jalimy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_platform_setup_and_discovery[light.powerasia_r2-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tuya/snapshots/test_select.ambr b/tests/components/tuya/snapshots/test_select.ambr index 69f0b5d74b0..74a6029ea66 100644 --- a/tests/components/tuya/snapshots/test_select.ambr +++ b/tests/components/tuya/snapshots/test_select.ambr @@ -3369,6 +3369,66 @@ 'state': 'unknown', }) # --- +# name: test_platform_setup_and_discovery[select.jardim_frontal_power_on_behavior-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + '0', + '1', + '2', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.jardim_frontal_power_on_behavior', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power on behavior', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Power on behavior', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'relay_status', + 'unique_id': 'tuya.xms6qowipdvjnkdgqdtrelay_status', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[select.jardim_frontal_power_on_behavior-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Jardim frontal Power on behavior', + 'options': list([ + '0', + '1', + '2', + ]), + }), + 'context': , + 'entity_id': 'select.jardim_frontal_power_on_behavior', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- # name: test_platform_setup_and_discovery[select.jardin_fraises_power_on_behavior-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -4403,6 +4463,66 @@ 'state': 'forward', }) # --- +# name: test_platform_setup_and_discovery[select.puerta_casa_power_on_behavior-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + '0', + '1', + '2', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.puerta_casa_power_on_behavior', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power on behavior', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Power on behavior', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'relay_status', + 'unique_id': 'tuya.w9hdtm88xj5crtc1qdtrelay_status', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[select.puerta_casa_power_on_behavior-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Puerta Casa Power on behavior', + 'options': list([ + '0', + '1', + '2', + ]), + }), + 'context': , + 'entity_id': 'select.puerta_casa_power_on_behavior', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- # name: test_platform_setup_and_discovery[select.raspy4_home_assistant_indicator_light_mode-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -4703,6 +4823,66 @@ 'state': 'power_on', }) # --- +# name: test_platform_setup_and_discovery[select.server_fan_power_on_behavior-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + '0', + '1', + '2', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.server_fan_power_on_behavior', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power on behavior', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Power on behavior', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'relay_status', + 'unique_id': 'tuya.cxbmhihohohk5bmeqdtrelay_status', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[select.server_fan_power_on_behavior-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Server Fan Power on behavior', + 'options': list([ + '0', + '1', + '2', + ]), + }), + 'context': , + 'entity_id': 'select.server_fan_power_on_behavior', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2', + }) +# --- # name: test_platform_setup_and_discovery[select.siren_siren_mode-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tuya/snapshots/test_sensor.ambr b/tests/components/tuya/snapshots/test_sensor.ambr index ea89ede8579..7366b0c16ce 100644 --- a/tests/components/tuya/snapshots/test_sensor.ambr +++ b/tests/components/tuya/snapshots/test_sensor.ambr @@ -14159,6 +14159,432 @@ 'state': 'unavailable', }) # --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_air_quality_index-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mt15_mt29_air_quality_index', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Air quality index', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Air quality index', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'air_quality_index', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhair_quality_index', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_air_quality_index-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'MT15/MT29 Air quality index', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_air_quality_index', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'level_1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mt15_mt29_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhbattery_percentage', + 'unit_of_measurement': '%', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'MT15/MT29 Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '100.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_carbon_dioxide-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mt15_mt29_carbon_dioxide', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Carbon dioxide', + 'options': dict({ + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'ppm', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Carbon dioxide', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'carbon_dioxide', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhco2_value', + 'unit_of_measurement': 'ppm', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_carbon_dioxide-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'carbon_dioxide', + 'friendly_name': 'MT15/MT29 Carbon dioxide', + 'state_class': , + 'unit_of_measurement': 'ppm', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_carbon_dioxide', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '439.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_formaldehyde-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mt15_mt29_formaldehyde', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Formaldehyde', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Formaldehyde', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'formaldehyde', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhch2o_value', + 'unit_of_measurement': 'mg/m┬│', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_formaldehyde-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'MT15/MT29 Formaldehyde', + 'state_class': , + 'unit_of_measurement': 'mg/m┬│', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_formaldehyde', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.001', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_humidity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mt15_mt29_humidity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Humidity', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Humidity', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'humidity', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhhumidity_value', + 'unit_of_measurement': '%', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_humidity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'humidity', + 'friendly_name': 'MT15/MT29 Humidity', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_humidity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '68.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_pm10-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mt15_mt29_pm10', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'PM10', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'PM10', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'pm10', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhpm10', + 'unit_of_measurement': 'ug/m┬│', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_pm10-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'MT15/MT29 PM10', + 'state_class': , + 'unit_of_measurement': 'ug/m┬│', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_pm10', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '15.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_pm2_5-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mt15_mt29_pm2_5', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'PM2.5', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'PM2.5', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'pm25', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhpm25_value', + 'unit_of_measurement': 'ug/m┬│', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_pm2_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'MT15/MT29 PM2.5', + 'state_class': , + 'unit_of_measurement': 'ug/m┬│', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_pm2_5', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '11.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.mt15_mt29_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Temperature', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'temperature', + 'unique_id': 'tuya.rzt2knqamsxjp8f9ycjjhtemp_current', + 'unit_of_measurement': 'Ôäâ', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.mt15_mt29_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'MT15/MT29 Temperature', + 'state_class': , + 'unit_of_measurement': 'Ôäâ', + }), + 'context': , + 'entity_id': 'sensor.mt15_mt29_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '27.0', + }) +# --- # name: test_platform_setup_and_discovery[sensor.n4_auto_current-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -15696,6 +16122,60 @@ 'state': '17.0', }) # --- +# name: test_platform_setup_and_discovery[sensor.pir_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.pir_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery', + 'unique_id': 'tuya.kkgbskmfejn67l1oripbattery_percentage', + 'unit_of_measurement': '%', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.pir_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'PIR Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.pir_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_platform_setup_and_discovery[sensor.pir_outside_stairs_battery_state-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -17395,6 +17875,167 @@ 'state': '2357.0', }) # --- +# name: test_platform_setup_and_discovery[sensor.sensor_t_h_server_home_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.sensor_t_h_server_home_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery', + 'unique_id': 'tuya.3kdnp0ajo7zdolfxgcdswbattery_percentage', + 'unit_of_measurement': '%', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.sensor_t_h_server_home_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'Sensor T & H Server Home Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.sensor_t_h_server_home_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '100.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.sensor_t_h_server_home_humidity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.sensor_t_h_server_home_humidity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Humidity', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Humidity', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'humidity', + 'unique_id': 'tuya.3kdnp0ajo7zdolfxgcdswva_humidity', + 'unit_of_measurement': '%', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.sensor_t_h_server_home_humidity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'humidity', + 'friendly_name': 'Sensor T & H Server Home Humidity', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.sensor_t_h_server_home_humidity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '50.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.sensor_t_h_server_home_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.sensor_t_h_server_home_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Temperature', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'temperature', + 'unique_id': 'tuya.3kdnp0ajo7zdolfxgcdswva_temperature', + 'unit_of_measurement': 'Ôäâ', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.sensor_t_h_server_home_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Sensor T & H Server Home Temperature', + 'state_class': , + 'unit_of_measurement': 'Ôäâ', + }), + 'context': , + 'entity_id': 'sensor.sensor_t_h_server_home_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '32.7', + }) +# --- # name: test_platform_setup_and_discovery[sensor.siren_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -20650,6 +21291,167 @@ 'state': '20.0', }) # --- +# name: test_platform_setup_and_discovery[sensor.temperature_humidity_sensor_abelhas_pasillo_battery-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.temperature_humidity_sensor_abelhas_pasillo_battery', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery', + 'unique_id': 'tuya.kkcwqzlvgcdswbattery_percentage', + 'unit_of_measurement': '%', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.temperature_humidity_sensor_abelhas_pasillo_battery-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'battery', + 'friendly_name': 'Temperature Humidity Sensor abelhas pasillo Battery', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.temperature_humidity_sensor_abelhas_pasillo_battery', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.temperature_humidity_sensor_abelhas_pasillo_humidity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.temperature_humidity_sensor_abelhas_pasillo_humidity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Humidity', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Humidity', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'humidity', + 'unique_id': 'tuya.kkcwqzlvgcdswva_humidity', + 'unit_of_measurement': '%', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.temperature_humidity_sensor_abelhas_pasillo_humidity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'humidity', + 'friendly_name': 'Temperature Humidity Sensor abelhas pasillo Humidity', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.temperature_humidity_sensor_abelhas_pasillo_humidity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.temperature_humidity_sensor_abelhas_pasillo_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.temperature_humidity_sensor_abelhas_pasillo_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Temperature', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'temperature', + 'unique_id': 'tuya.kkcwqzlvgcdswva_temperature', + 'unit_of_measurement': 'Ôäâ', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.temperature_humidity_sensor_abelhas_pasillo_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Temperature Humidity Sensor abelhas pasillo Temperature', + 'state_class': , + 'unit_of_measurement': 'Ôäâ', + }), + 'context': , + 'entity_id': 'sensor.temperature_humidity_sensor_abelhas_pasillo_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_platform_setup_and_discovery[sensor.tournesol_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -22768,6 +23570,177 @@ 'state': '0.19', }) # --- +# name: test_platform_setup_and_discovery[sensor.wifi_dual_meter_total_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.wifi_dual_meter_total_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Total energy', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Total energy', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'total_energy', + 'unique_id': 'tuya.lnjsbx45z3p7s59zbdnzforward_energy_total', + 'unit_of_measurement': , + }) +# --- +# name: test_platform_setup_and_discovery[sensor.wifi_dual_meter_total_energy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'WIFI Dual Meter Total energy', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.wifi_dual_meter_total_energy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.wifi_dual_meter_total_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.wifi_dual_meter_total_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Total power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Total power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'total_power', + 'unique_id': 'tuya.lnjsbx45z3p7s59zbdnztotal_powerpower', + 'unit_of_measurement': 'W', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.wifi_dual_meter_total_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'WIFI Dual Meter Total power', + 'state_class': , + 'unit_of_measurement': 'W', + }), + 'context': , + 'entity_id': 'sensor.wifi_dual_meter_total_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.wifi_dual_meter_total_production-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.wifi_dual_meter_total_production', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Total production', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Total production', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'total_production', + 'unique_id': 'tuya.lnjsbx45z3p7s59zbdnzreverse_energy_total', + 'unit_of_measurement': , + }) +# --- +# name: test_platform_setup_and_discovery[sensor.wifi_dual_meter_total_production-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'WIFI Dual Meter Total production', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.wifi_dual_meter_total_production', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unavailable', + }) +# --- # name: test_platform_setup_and_discovery[sensor.wifi_smart_gas_boiler_thermostat_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/tuya/snapshots/test_switch.ambr b/tests/components/tuya/snapshots/test_switch.ambr index 2889ed83c86..dfc25504e06 100644 --- a/tests/components/tuya/snapshots/test_switch.ambr +++ b/tests/components/tuya/snapshots/test_switch.ambr @@ -5875,6 +5875,56 @@ 'state': 'on', }) # --- +# name: test_platform_setup_and_discovery[switch.jardim_frontal_switch_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.jardim_frontal_switch_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Switch 1', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Switch 1', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_switch', + 'unique_id': 'tuya.xms6qowipdvjnkdgqdtswitch_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[switch.jardim_frontal_switch_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'outlet', + 'friendly_name': 'Jardim frontal Switch 1', + }), + 'context': , + 'entity_id': 'switch.jardim_frontal_switch_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[switch.jardin_fraises_switch_1-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -7999,6 +8049,56 @@ 'state': 'off', }) # --- +# name: test_platform_setup_and_discovery[switch.puerta_casa_switch_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.puerta_casa_switch_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Switch 1', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Switch 1', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_switch', + 'unique_id': 'tuya.w9hdtm88xj5crtc1qdtswitch_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[switch.puerta_casa_switch_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'outlet', + 'friendly_name': 'Puerta Casa Switch 1', + }), + 'context': , + 'entity_id': 'switch.puerta_casa_switch_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[switch.qt_switch_switch_1-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -8795,6 +8895,56 @@ 'state': 'on', }) # --- +# name: test_platform_setup_and_discovery[switch.server_fan_switch_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.server_fan_switch_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Switch 1', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Switch 1', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_switch', + 'unique_id': 'tuya.cxbmhihohohk5bmeqdtswitch_1', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[switch.server_fan_switch_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'outlet', + 'friendly_name': 'Server Fan Switch 1', + }), + 'context': , + 'entity_id': 'switch.server_fan_switch_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- # name: test_platform_setup_and_discovery[switch.signal_repeater_socket_1-entry] EntityRegistryEntrySnapshot({ 'aliases': set({