local device = {} device.model = "ZWT07" device.vendor = "Tuya" device.description = "Wall-mount thermostat" device.exposes = { { type = "climate", features = { { type = "numeric", name = "current_heating_setpoint", property = "current_heating_setpoint", access = 3, unit = "°C", min = 5, max = 60, value_step = 0.5, description = "Temperature setpoint", }, { type = "enum", name = "system_mode", property = "system_mode", access = 3, description = "Mode of this device", values = { "off", "heat" }, }, { type = "enum", name = "running_state", property = "running_state", access = 1, description = "The current running state", values = { "idle", "heat" }, }, { type = "enum", name = "preset", property = "preset", access = 3, description = "Mode of this device (similar to system_mode)", values = { "manual", "program" }, }, { type = "numeric", name = "local_temperature", property = "local_temperature", access = 5, unit = "°C", description = "Current temperature measured on the device", }, }, }, { type = "binary", name = "frost", property = "frost", access = 3, value_on = "ON", value_off = "OFF", description = "Antifreeze function", }, } device.tuyaDatapoints = { { dp = 1, name = "system_mode", converter = "lookup" }, { dp = 2, name = "preset", converter = "lookup", lookup = { program = 0, manual = 1 } }, { dp = 36, name = "running_state", converter = "lookup", lookup = { idle = 0, heat = 1 } }, { dp = 16, name = "current_heating_setpoint", converter = "divideBy10" }, { dp = 24, name = "local_temperature", converter = "divideBy10" }, { dp = 10, name = "frost", converter = "onOff" }, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_g9a3awaj", }, } return device