local device = {} device.model = "WZ5_rgb_1" device.vendor = "Tuya" device.description = "Zigbee & RF 5 in 1 LED controller (RGB mode)" device.exposes = { { type = "light", features = { { type = "binary", name = "state", property = "state", access = 7, value_on = "ON", value_off = "OFF", description = "On/off state of this light", }, { type = "numeric", name = "brightness", property = "brightness", access = 7, min = 0, max = 254, description = "Brightness of this light", }, { type = "composite", name = "color_hs", property = "color", access = 7, description = "Color of this light expressed as hue/saturation", features = { { type = "numeric", name = "hue", property = "hue", access = 7, }, { type = "numeric", name = "saturation", property = "saturation", access = 7, }, }, }, { type = "composite", name = "color_xy", property = "color", access = 7, description = "Color of this light in the CIE 1931 color space (x/y)", features = { { type = "numeric", name = "x", property = "x", access = 7, }, { type = "numeric", name = "y", property = "y", access = 7, }, }, }, }, }, { type = "enum", name = "effect", property = "effect", access = 2, description = "Triggers an effect on the light (e.g. make light blink for a few seconds)", values = { "blink", "breathe", "okay", "channel_change", "finish_effect", "stop_effect", "colorloop", "stop_colorloop", }, }, { type = "binary", name = "do_not_disturb", property = "do_not_disturb", access = 3, value_on = true, value_off = false, description = "Do not disturb mode, when enabled this function will keep the light OFF after a power outage", category = "config", }, { type = "enum", name = "color_power_on_behavior", property = "color_power_on_behavior", access = 3, description = "Power on behavior state", category = "config", values = { "initial", "previous", "customized" }, }, } device.fromZigbee = { "on_off", "brightness", "color_temp", "color_hs", "color_xy" } device.configure = { bind = { "genOnOff", "genLevelCtrl", "lightingColorCtrl" }, reporting = { { cluster = "genOnOff", attribute = "onOff", min = 0, max = 3600, change = 0, }, { cluster = "genLevelCtrl", attribute = "currentLevel", min = 1, max = 3600, change = 1, }, { cluster = "lightingColorCtrl", attribute = "colorTemperatureMireds", min = 1, max = 3600, change = 1, }, }, } device.fingerprint = { { model = "TS0503B", manufacturer = "_TZB210_zdvrsts8", }, } return device