local device = {} device.model = "ZWT198/ZWT100-BH" device.vendor = "Tuya" device.description = "Wall thermostat" device.exposes = { { type = "binary", name = "factory_reset", property = "factory_reset", access = 3, value_on = "ON", value_off = "OFF", description = "Full factory reset, use with caution!", }, { type = "binary", name = "child_lock", property = "child_lock", access = 3, value_on = "LOCK", value_off = "UNLOCK", description = "Enables/disables physical input on the device", }, { type = "enum", name = "sensor", property = "sensor", access = 3, description = "Select temperature sensor to use", category = "config", values = { "internal", "external", "both" }, }, { type = "climate", features = { { type = "enum", name = "system_mode", property = "system_mode", access = 3, description = "Mode of this device", values = { "off", "heat" }, }, { type = "enum", name = "preset", property = "preset", access = 3, description = "Mode of this device (similar to system_mode)", values = { "manual", "auto", "temporary_manual" }, }, { type = "numeric", name = "current_heating_setpoint", property = "current_heating_setpoint", access = 3, unit = "°C", min = 5, max = 35, value_step = 0.5, description = "Temperature setpoint", }, { type = "enum", name = "running_state", property = "running_state", access = 1, description = "The current running state", values = { "idle", "heat" }, }, { type = "numeric", name = "local_temperature", property = "local_temperature", access = 1, unit = "°C", description = "Current temperature measured on the device", }, { type = "numeric", name = "local_temperature_calibration", property = "local_temperature_calibration", access = 3, unit = "°C", min = -9.9, max = 9.9, value_step = 0.1, description = "Offset to add/subtract to the local temperature", }, }, }, { type = "binary", name = "frost_protection", property = "frost_protection", access = 3, value_on = "ON", value_off = "OFF", description = "Antifreeze function", }, { type = "numeric", name = "max_temperature_limit", property = "max_temperature_limit", access = 3, unit = "°C", min = 15, max = 90, value_step = 0.5, description = "Maximum upper temperature", }, { type = "numeric", name = "deadzone_temperature", property = "deadzone_temperature", access = 3, unit = "°C", min = 0.1, max = 10, value_step = 0.1, description = "The delta between local_temperature (5