local device = {} device.model = "TS0601_switch_10" device.vendor = "Tuya" device.description = "10 gang switch" 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", }, }, }, { type = "switch", endpoint = "l3", features = { { type = "binary", name = "state", property = "state_l3", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l3", }, }, }, { type = "switch", endpoint = "l4", features = { { type = "binary", name = "state", property = "state_l4", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l4", }, }, }, { type = "switch", endpoint = "l5", features = { { type = "binary", name = "state", property = "state_l5", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l5", }, }, }, { type = "switch", endpoint = "l6", features = { { type = "binary", name = "state", property = "state_l6", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l6", }, }, }, { type = "switch", endpoint = "l7", features = { { type = "binary", name = "state", property = "state_l7", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l7", }, }, }, { type = "switch", endpoint = "l8", features = { { type = "binary", name = "state", property = "state_l8", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l8", }, }, }, { type = "switch", endpoint = "l9", features = { { type = "binary", name = "state", property = "state_l9", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l9", }, }, }, { type = "switch", endpoint = "l10", features = { { type = "binary", name = "state", property = "state_l10", access = 3, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l10", }, }, }, } device.tuyaDatapoints = { { dp = 1, name = "state_l1", converter = "onOff" }, { dp = 2, name = "state_l2", converter = "onOff" }, { dp = 3, name = "state_l3", converter = "onOff" }, { dp = 4, name = "state_l4", converter = "onOff" }, { dp = 5, name = "state_l5", converter = "onOff" }, { dp = 6, name = "state_l6", converter = "onOff" }, { dp = 101, name = "state_l7", converter = "onOff" }, { dp = 102, name = "state_l8", converter = "onOff" }, { dp = 103, name = "state_l9", converter = "onOff" }, { dp = 104, name = "state_l10", converter = "onOff" }, } device.meta = { multiEndpoint = true } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_7sjncirf", }, { model = "TS0601", manufacturer = "TZE204_7sjncirf", }, } return device