From 4151b33c38ece6469e817c22754d50d5493a7a62 Mon Sep 17 00:00:00 2001 From: mattreim <80219712+mattreim@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:45:13 +0100 Subject: [PATCH] Update _TZE200_TYST11_trv.json --- devices/tuya/_TZE200_TYST11_trv.json | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/devices/tuya/_TZE200_TYST11_trv.json b/devices/tuya/_TZE200_TYST11_trv.json index b425cff338..8cb9efc704 100644 --- a/devices/tuya/_TZE200_TYST11_trv.json +++ b/devices/tuya/_TZE200_TYST11_trv.json @@ -48,6 +48,15 @@ "0x01", "0xef00" ], + "meta": { + "values": { + "config/mode": { + "auto": 1, + "heat": 2, + "off": 0 + } + } + }, "items": [ { "name": "attr/id" @@ -136,25 +145,25 @@ } }, { - "name": "config/on" - }, - { - "name": "config/preset", + "name": "config/mode", "parse": { "fn": "tuya", "dpid": 4, - "script": "tuya_trv_preset.js" + "eval": "if (Attr.val == 0) { Item.val = 'off' } else if (Attr.val == 1) { Item.val = 'auto' } else if (Attr.val == 2) { Item.val = 'heat' }" }, "write": { "fn": "tuya", "dpid": 4, "dt": "0x30", - "script": "tuya_trv_preset_set.js" + "eval": "if (Item.val == 'off') { 0 } else if (Item.val == 'auto') { 1 } else if (Item.val == 'heat') { 2 }" }, "read": { "fn": "none" } }, + { + "name": "config/on" + }, { "name": "config/reachable" },