This device use the tuya cluster, so hard to make something just with the GUI.
that this device can be set as a toggle switch, momentary switch and I forgot the third option
This seem a problem for me, because you have entry and output, so IDK if it s possible to make the first one independent of the second one, can try, will see what happen.
I haven’t all information, so I have tried to guess them, can you try this DDF
{
"schema": "devcap1.schema.json",
"manufacturername": "_TZ3000_bvrlqyj7",
"modelid": "TS0002",
"vendor": "$MF_TUYA",
"product": "Switch 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", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
"read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"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/reachable"
}
]
},
{
"type": "$TYPE_DIMMABLE_PLUGIN_UNIT",
"restapi": "/lights",
"uuid": [
"$address.ext",
"0x02"
],
"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", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
"read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "state/on",
"parse": {"fn": "tuya", "dpid": 2, "eval": "Item.val = Attr.val;" },
"write": {"fn": "tuya", "dpid": 2, "dt": "0x10", "eval": "Item.val == 1 ? 1 : 0;"},
"read": {"fn": "none"},
"refresh.interval": 84000
},
{
"name": "state/reachable"
}
]
}
]
}
If it don’t work, can you enble log “info” “info_l2” and “ddf” and share the logs when using the button, it s a log with tuya information