local device = {} device.model = "YY-LT500" device.vendor = "Tuya" device.description = "Window opener" 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", }, }, }, } device.tuyaDatapoints = { { dp = 2, name = "state", converter = "lookup", lookup = { OPEN = 0, STOP = 1, CLOSE = 2 } }, { dp = 7, name = "position", converter = "coverPosition" }, { dp = 8, name = "position", converter = "coverPosition" }, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_a8z0g46u", }, { model = "TS0601", manufacturer = "_TZE204_a8z0g46u", }, } return device