local device = {} device.model = "TS0601_switch_2_gang" device.vendor = "Tuya" device.description = "2 gang switch" device.zigbeeModel = { "ZG-302Z2" } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_nkjintbl", }, { model = "TS0601", manufacturer = "_TZE200_ji1gn7rw", }, { model = "TS0601", manufacturer = "_TZE200_3t91nb6k", }, { model = "TS0601", manufacturer = "_TZE204_wvovwe9h", }, { model = "TS0601", manufacturer = "_TZE200_wvovwe9h", }, { model = "TS0601", manufacturer = "_TZE204_3t91nb6k", }, } device.exposes = { { type = "switch", endpoint = "l1", features = { { type = "binary", name = "state", property = "state_l1", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l1", }, }, }, { type = "switch", endpoint = "l2", features = { { type = "binary", name = "state", property = "state_l2", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l2", }, }, }, } device.tuya = { magicPacket = true, } device.tuyaDatapoints = { { dp = 1, name = "state_l1", converter = "onOff" }, { dp = 2, name = "state_l2", converter = "onOff" }, } device.meta = { multiEndpoint = true } device.endpoint = { l1 = 1, l2 = 1, } return device