local device = {} device.model = "DCR-CO" device.vendor = "Tuya" device.description = "Smart air box (carbon monoxide)" device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_7bztmfm1", }, { model = "TS0601", manufacturer = "_TZE204_7bztmfm1", }, } device.exposes = { { type = "binary", name = "carbon_monoxide", property = "carbon_monoxide", access = 1, value_on = "ON", value_off = "OFF", description = "Indicates if CO (carbon monoxide) is detected", }, { type = "numeric", name = "co", property = "co", access = 1, unit = "ppm", description = "The measured CO (carbon monoxide) value", }, } device.tuyaDatapoints = { { dp = 2, name = "co", converter = "divideBy100" }, { dp = 1, name = "carbon_monoxide", converter = "onOffInvert" }, } return device