local device = {} device.model = "TS0601_smoke_1" device.vendor = "Tuya" device.description = "Smoke sensor" device.exposes = { { type = "binary", name = "smoke", property = "smoke", access = 1, value_on = true, value_off = false, description = "Indicates whether the device detected smoke", }, { type = "binary", name = "tamper", property = "tamper", access = 1, value_on = true, value_off = false, description = "Indicates whether the device is tampered", }, { type = "binary", name = "battery_low", property = "battery_low", access = 1, value_on = true, value_off = false, description = "Indicates if the battery of this device is almost empty", category = "diagnostic", }, { type = "binary", name = "occupancy", property = "occupancy", access = 1, value_on = true, value_off = false, description = "Indicates whether the device detected occupancy", }, { type = "binary", name = "contact", property = "contact", access = 1, value_on = false, value_off = true, description = "Indicates if the contact is closed or open", }, } device.fromZigbee = { "ias_zone" } device.tuyaDatapoints = { { dp = 1, name = "smoke", converter = "trueFalse0" }, { dp = 4, name = "tamper", converter = "raw" }, { dp = 14, name = "battery_low", converter = "trueFalse0" }, } device.configure = { bind = { "ssIasZone" }, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_0zaf1cr8", }, { model = "TS0601", manufacturer = "_TZE204_ntcy3xu1", }, { model = "TS0601", manufacturer = "_TZE284_0zaf1cr8", }, } return device