local device = {} device.model = "TS0013" device.vendor = "Tuya" device.description = "Smart light switch - 3 gang without neutral wire" device.zigbeeModel = { "TS0013", "ZG-302Z3" } device.exposes = { { type = "switch", endpoint = "left", features = { { type = "binary", name = "state", property = "state_left", access = 7, value_on = "ON", value_off = "OFF", description = "On/off state of the left switch", endpoint = "left", }, }, }, { type = "switch", endpoint = "center", features = { { type = "binary", name = "state", property = "state_center", access = 7, value_on = "ON", value_off = "OFF", description = "On/off state of the center switch", endpoint = "center", }, }, }, { type = "switch", endpoint = "right", features = { { type = "binary", name = "state", property = "state_right", access = 7, value_on = "ON", value_off = "OFF", description = "On/off state of the right switch", endpoint = "right", }, }, }, } device.tuya = { magicPacket = true, } device.fromZigbee = { "on_off" } device.toZigbee = { "on_off" } device.endpoint = { left = 1, center = 2, right = 3, } device.configure = { bind = { "genOnOff" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, }, } device.meta = { multiEndpoint = true } return device