diff --git a/devices/moes/Moes_TS0601_1_gang_dimmer_module.json b/devices/moes/Moes_TS0601_1_gang_dimmer_module.json new file mode 100644 index 0000000000..148f3db834 --- /dev/null +++ b/devices/moes/Moes_TS0601_1_gang_dimmer_module.json @@ -0,0 +1,72 @@ +{ + "schema": "devcap1.schema.json", + "manufacturername": ["_TZE200_la2c2uo9", "_TZE204_dcnsggvz"], + "modelid": ["TS0601", "TS0601"], + "vendor": "Moes", + "product": "Moes 1-Gang Dimmer Module", + "sleeper": false, + "status": "Gold", + "subdevices": [ + { + "type": "$TYPE_DIMMABLE_PLUGIN_UNIT", + "restapi": "/lights", + "uuid": [ + "$address.ext", + "0x01" + ], + "items": [ + { + "name": "attr/id" + }, + { + "name": "attr/lastannounced" + }, + { + "name": "attr/lastseen" + }, + { + "name": "attr/manufacturername" + }, + { + "name": "attr/modelid" + }, + { + "name": "attr/name" + }, + { + "name": "attr/swversion", + "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" + }, + { + "name": "attr/uniqueid" + }, + { + "name": "state/alert", + "default": "none", + "public": false + }, + { + "name": "state/on", + "parse": {"fn": "tuya", "dpid": 1, "eval": "Item.val = Attr.val;" }, + "write": {"fn": "tuya", "dpid": 1, "dt": "0x10", "eval": "Item.val == 1 ? 1 : 0;"}, + "read": {"fn": "tuya"}, + "refresh.interval": 300 + }, + { + "name": "state/bri", + "parse": {"fn": "tuya", "dpid": 2, "eval": "Item.val = (Attr.val / 1000.0) * 254.0;"}, + "write": {"fn": "tuya", "dpid": 2, "dt": "0x2b", "eval": "(Item.val / 254.0) * 1000.0;"}, + "read": {"fn": "none"}, + "refresh.interval": 84000 + }, + { + "name": "state/reachable" + } + ] + } + ] +} \ No newline at end of file