local device = {} device.model = "TS0601_cover_10" device.vendor = "Tuya" device.description = "Cover motor" device.exposes = { { type = "cover", features = { { type = "enum", name = "state", property = "state", access = 3, values = { "OPEN", "CLOSE", "STOP" }, }, { type = "numeric", name = "position", property = "position", access = 3, unit = "%", min = 0, max = 100, description = "Position of this cover", }, }, }, { type = "enum", name = "motor_direction", property = "motor_direction", access = 3, description = "Set the motor direction", values = { "normal", "reversed" }, }, } device.tuyaDatapoints = { { dp = 1, name = "state", converter = "lookup", lookup = { CLOSE = 0, STOP = 1, OPEN = 2 } }, { dp = 2, name = "position", converter = "coverPosition" }, { dp = 3, name = "position", converter = "raw" }, { dp = 5, name = "motor_direction", converter = "lookup" }, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_clm4gdw4", }, { model = "TS0601", manufacturer = "_TZE200_2vfxweng", }, { model = "TS0601", manufacturer = "_TZE200_gnw1rril", }, { model = "TS0601", manufacturer = "_TZE204_ycke4deo", }, { model = "TS0601", manufacturer = "_TZE284_koxaopnk", }, { model = "TS0601", manufacturer = "_TZE284_clm4gdw4", }, } return device