From 8c4d9bcdc15fc83327f0e7338c6e7d6ec8442cfe Mon Sep 17 00:00:00 2001 From: mattreim <80219712+mattreim@users.noreply.github.com> Date: Sun, 3 Nov 2024 11:08:01 +0100 Subject: [PATCH] Add _TZE200_TYST11_trv --- ...nedis_trv.json => _TZE200_TYST11_trv.json} | 89 +++++++++++++------ 1 file changed, 62 insertions(+), 27 deletions(-) rename devices/tuya/{_TZE200_hhrtiq0x_nedis_trv.json => _TZE200_TYST11_trv.json} (59%) diff --git a/devices/tuya/_TZE200_hhrtiq0x_nedis_trv.json b/devices/tuya/_TZE200_TYST11_trv.json similarity index 59% rename from devices/tuya/_TZE200_hhrtiq0x_nedis_trv.json rename to devices/tuya/_TZE200_TYST11_trv.json index 48674a5a03..18843b7491 100644 --- a/devices/tuya/_TZE200_hhrtiq0x_nedis_trv.json +++ b/devices/tuya/_TZE200_TYST11_trv.json @@ -1,10 +1,42 @@ { "schema": "devcap1.schema.json", "uuid": "f2401df5-5635-4878-b176-e3246192b02c", - "manufacturername": ["_TZE200_hhrtiq0x", "_TZE200_ps5v5jor", "_TZE200_2cs6g9i7"], - "modelid": ["TS0601", "TS0601", "TS0601"], - "vendor": "Tuya", - "product": "Nedis TRV (TS0601)", + "manufacturername": [ + "_TYST11_zivfvd7h", + "_TZE200_zivfvd7h", + "_TYST11_kfvq6avy", + "_TZE200_kfvq6avy", + "_TYST11_jeaxp72v", + "_TZE200_jeaxp72v", + "_TYST11_hhrtiq0x", + "_TZE200_hhrtiq0x", + "_TYST11_ps5v5jor", + "_TZE200_ps5v5jor", + "_TYST11_owwdxjbx", + "_TZE200_owwdxjbx", + "_TYST11_8daqwrsj", + "_TZE200_8daqwrsj", + "_TZE200_2cs6g9i7" + ], + "modelid": [ + "ivfvd7h", + "TS0601", + "fvq6avy", + "TS0601", + "eaxp72v", + "TS0601", + "hrtiq0x", + "TS0601", + "s5v5jor", + "TS0601", + "wwdxjbx", + "TS0601", + "daqwrsj", + "TS0601", + "TS0601" + ], + "vendor": "Tuya: Essentials, Revolt, Siterwell, Nedis...", + "product": "Tuya radiator thermostat", "sleeper": false, "status": "Gold", "subdevices": [ @@ -16,11 +48,6 @@ "0x01", "0xef00" ], - "meta": { - "values": { - "config/mode": {"auto": 0, "heat": 1, "off": 2} - } - }, "items": [ { "name": "attr/id" @@ -41,7 +68,10 @@ "name": "attr/name" }, { - "name": "attr/swversion" + "name": "attr/swversion", + "refresh.interval": 86400, + "parse": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"}, + "read": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001"} }, { "name": "attr/type" @@ -69,29 +99,33 @@ { "name": "config/on" }, + { + "name": "config/preset", + "parse": {"fn": "tuya", "dpid": 4, "script": "tuya_trv_preset.js"}, + "write": {"fn": "tuya", "dpid": 4, "dt": "0x30", "script": "tuya_trv_preset_set.js"}, + "read": {"fn": "none"} + }, { "name": "config/reachable" }, { - "name": "config/windowopen_set", - "parse": {"fn": "tuya", "dpid": 18, "eval": "Item.val = Attr.val;"}, - "write": {"fn": "tuya", "dpid": 18, "dt": "0x10", "eval": "Item.val;"}, + "name": "config/setvalve", + "public": true, + "parse": {"fn": "tuya", "dpid": 20, "eval": "Item.val = Attr.val;"}, + "write": {"fn": "tuya", "dpid": 20, "dt": "0x10", "eval": "Item.val;"}, "read": {"fn": "none"} }, { - "name": "config/mode", - "values": [ - ["auto", 0], ["heat", 1], ["off", 2] - ], - "parse": {"fn": "tuya", "dpid": 106, "eval": "if (Attr.val == 0) { Item.val = 'auto' } else if (Attr.val == 1) { Item.val = 'heat' } else { Item.val = 'off' }"}, - "write": {"fn": "tuya", "dpid": 106, "dt": "0x30", "eval": "if (Item.val == 'auto') { 0 } else if (Item.val == 'heat') { 1 } else { 2 }"}, + "name": "config/windowopen_set", + "parse": {"fn": "tuya", "dpid": 18, "eval": "Item.val = Attr.val;"}, + "write": {"fn": "tuya", "dpid": 18, "dt": "0x10", "eval": "Item.val;"}, "read": {"fn": "none"} }, { - "name": "config/preset", - "parse": {"fn": "tuya", "dpid": 4, "script": "tuya_trv_preset.js"}, - "write": {"fn": "tuya", "dpid": 4, "dt": "0x30", "script": "tuya_trv_preset_set.js"}, - "read": {"fn": "none"} + "name": "state/errorcode", + "parse": {"fn": "tuya", "dpid": 19, "eval": "Item.val = Attr.val;"}, + "read": {"fn": "none"}, + "default": "0" }, { "name": "state/lastupdated" @@ -102,11 +136,12 @@ "read": {"fn": "none"} }, { - "name": "state/valve", - "parse": {"fn": "tuya", "dpid": 109, "eval": "Item.val = Attr.val > 5;"}, - "read": {"fn": "none"} + "name": "state/windowopen", + "parse": {"fn": "tuya", "dpid": 17, "eval": "if (Attr.val == 0) { Item.val = 'close' } else { Item.val = 'open' };"}, + "read": {"fn": "none"}, + "default": "close" } ] } ] -} \ No newline at end of file +}