local device = {} device.model = "TS0601_switch_6_gang" device.vendor = "Tuya" device.description = "6 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 = "enum", name = "power_on_behavior", property = "power_on_behavior", access = 7, description = "Power on behavior state", category = "config", values = { "off", "on", "previous" }, }, { type = "enum", name = "indicator_mode", property = "indicator_mode", access = 7, description = "Mode of the indicator light", category = "config", values = { "none", "relay", "pos" }, }, } 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 = 14, name = "power_on_behavior", converter = "lookup", lookup = { off = 0, on = 1, memory = 2 } }, { dp = 15, name = "indicator_mode", converter = "lookup", lookup = { none = 0, relay = 1, pos = 2 } }, } device.meta = { multiEndpoint = true } device.endpoint = { l1 = 1, l2 = 1, l3 = 1, l4 = 1, l5 = 1, l6 = 1, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_mwvfvw8g", }, { model = "TS0601", manufacturer = "_TZE200_wnp4d4va", }, { model = "TS0601", manufacturer = "_TZE200_cduqh1l0", }, { model = "TS0601", manufacturer = "_TZE204_cduqh1l0", }, { model = "TS0601", manufacturer = "_TZE200_emxxanvi", }, { model = "TS0601", manufacturer = "_TZE204_g4au0afs", }, { model = "TS0601", manufacturer = "_TZE204_w1wwxoja", }, { model = "TS0601", manufacturer = "_TZE204_lmgrbuwf", }, { model = "TS0601", manufacturer = "_TZE284_tdhnhhiy", }, { model = "TS0601", manufacturer = "_TZE204_wskr3up8", }, { model = "TS0601", manufacturer = "_TZE204_gxbdnfrh", }, { model = "TS0601", manufacturer = "_TZE284_g1enhdsi", }, } return device