local device = {} device.model = "XZ-AKT101" device.vendor = "Tuya" device.description = "Intelligent air conditioning wall switch" device.exposes = { { type = "binary", name = "air_switch", property = "air_switch", access = 3, value_on = true, value_off = false, }, { 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 = "climate", features = { { type = "numeric", name = "local_temperature", property = "local_temperature", access = 1, unit = "°C", description = "Current temperature measured on the device", }, { type = "numeric", name = "current_heating_setpoint", property = "current_heating_setpoint", access = 3, unit = "°C", min = 20, max = 30, value_step = 0.5, description = "Temperature setpoint", }, { type = "enum", name = "system_mode", property = "system_mode", access = 3, description = "Only for Homeassistant", values = { "cool", "heat", "fan_only" }, }, { type = "enum", name = "fan_mode", property = "fan_mode", access = 7, description = "Mode of the fan", values = { "low", "medium", "high", "auto" }, }, }, }, { type = "numeric", name = "boost_time", property = "boost_time", access = 3, unit = "H", min = 0, max = 24, value_step = 0.5, description = "Boost running time. Minimum 0 - maximum 24 hours", category = "config", }, } device.tuyaDatapoints = { { dp = 1, name = "air_switch", converter = "raw" }, { dp = 2, name = "system_mode", converter = "lookup", lookup = { cool = 0, heat = 1, fan_only = 2 } }, { dp = 28, name = "fan_mode", converter = "lookup", lookup = { low = 0, medium = 1, high = 2, auto = 3 } }, { dp = 16, name = "current_heating_setpoint", converter = "divideBy10" }, { dp = 24, name = "local_temperature", converter = "divideBy10" }, { dp = 40, name = "child_lock", converter = "lockUnlock" }, { dp = 101, name = "boost_time", converter = "divideBy10" }, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_1drr8tab", }, } return device