make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.28k stars 505 forks source link

Request support for TOMZN 1P+N WIFI Smart Switch Energy Meter Kwh Metering Monitoring #2002

Closed saboaua closed 3 months ago

saboaua commented 3 months ago

TOMZN 1P+N WIFI Smart Switch Energy Meter Kwh Metering Monitoring

Here is the information for the circuit breaker

Link to Device: https://www.aliexpress.com/item/1005005566304770.html?spm=a2g0o.order_list.order_list_main.11.42671802pJUQBB

Tuya IoT Information { "result": { "category": "dlq", "functions": [ { "code": "switch", "dp_id": 1, "type": "Boolean", "values": "{}" }, { "code": "countdown_1", "dp_id": 9, "type": "Integer", "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "relay_status", "dp_id": 38, "type": "Enum", "values": "{\"range\":[\"power_off\",\"power_on\",\"last\"]}" }, { "code": "light_mode", "dp_id": 40, "type": "Enum", "values": "{\"range\":[\"relay\",\"pos\",\"none\",\"on\"]}" }, { "code": "child_lock", "dp_id": 41, "type": "Boolean", "values": "{}" }, { "code": "cycle_time", "dp_id": 42, "type": "String", "values": "{\"maxlen\":255}" } ], "lang_config": {}, "status": [ { "code": "switch", "dp_id": 1, "type": "Boolean", "values": "{}" }, { "code": "countdown_1", "dp_id": 9, "type": "Integer", "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "add_ele", "dp_id": 17, "type": "Integer", "values": "{\"min\":0,\"max\":50000,\"scale\":3,\"step\":100}" }, { "code": "cur_current", "dp_id": 18, "type": "Integer", "values": "{\"unit\":\"mA\",\"min\":0,\"max\":100000,\"scale\":0,\"step\":1}" }, { "code": "cur_power", "dp_id": 19, "type": "Integer", "values": "{\"unit\":\"W\",\"min\":0,\"max\":199999,\"scale\":1,\"step\":1}" }, { "code": "cur_voltage", "dp_id": 20, "type": "Integer", "values": "{\"unit\":\"V\",\"min\":0,\"max\":5000,\"scale\":1,\"step\":1}" }, { "code": "test_bit", "dp_id": 21, "type": "Integer", "values": "{\"min\":0,\"max\":5,\"scale\":0,\"step\":1}" }, { "code": "voltage_coe", "dp_id": 22, "type": "Integer", "values": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}" }, { "code": "electric_coe", "dp_id": 23, "type": "Integer", "values": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}" }, { "code": "power_coe", "dp_id": 24, "type": "Integer", "values": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}" }, { "code": "electricity_coe", "dp_id": 25, "type": "Integer", "values": "{\"min\":0,\"max\":1000000,\"scale\":0,\"step\":1}" }, { "code": "relay_status", "dp_id": 38, "type": "Enum", "values": "{\"range\":[\"power_off\",\"power_on\",\"last\"]}" }, { "code": "light_mode", "dp_id": 40, "type": "Enum", "values": "{\"range\":[\"relay\",\"pos\",\"none\",\"on\"]}" }, { "code": "child_lock", "dp_id": 41, "type": "Boolean", "values": "{}" }, { "code": "cycle_time", "dp_id": 42, "type": "String", "values": "{\"maxlen\":255}" } ] }, "success": true, "t": 1718152819857, "tid": "5875a95c285411efa4f3b2d2f4ac9d51" }

make-all commented 3 months ago

Should be compatible with an an already existing config

saboaua commented 3 months ago

The only matches I get when trying to add the device is the pj1103 clamp meter which doesn't have the switch and child lock.

saboaua commented 3 months ago

i created the yaml file, maybe you can add it to the list

name: Circuit breaker products: