local device = {} device.model = "QAT44Z6" device.vendor = "QA" device.description = "6 channel scene switch" device.exposes = { { type = "switch", endpoint = "l1", features = { { type = "binary", name = "state", property = "state_l1", access = 7, 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 = 7, 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 = 7, 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 = 7, 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 = 7, 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 = 7, value_on = "ON", value_off = "OFF", description = "On/off state of the switch", endpoint = "l6", }, }, }, { type = "numeric", name = "backlight_brightness", property = "backlight_brightness", access = 7, unit = "%", min = 0, max = 99, description = "Backlight brightness (0-99)", }, { type = "enum", name = "action", property = "action", access = 1, description = "Triggered action (e.g. a button click)", category = "diagnostic", values = { "scene_1", "scene_2", "scene_3", "scene_4", "scene_5", "scene_6" }, }, } device.tuyaDatapoints = { { dp = 24, name = "state_l1", converter = "onOff" }, { dp = 25, name = "state_l2", converter = "onOff" }, { dp = 26, name = "state_l3", converter = "onOff" }, { dp = 27, name = "state_l4", converter = "onOff" }, { dp = 28, name = "state_l5", converter = "onOff" }, { dp = 29, name = "state_l6", converter = "onOff" }, { dp = 101, name = "backlight_brightness", converter = "raw" }, } device.meta = { multiEndpoint = true } device.endpoint = { l1 = 1, l2 = 1, l3 = 1, l4 = 1, l5 = 1, l6 = 1, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE284_ms97nkyy", }, } return device