local device = {} device.model = "TS0601_thermostat_thermosphere" device.vendor = "Tuya" device.description = "ThermoSphere thermostat" device.exposes = { { type = "climate", features = { { type = "enum", name = "system_mode", property = "system_mode", access = 3, description = "Whether the thermostat is turned on or off", values = { "off", "auto" }, }, { 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 = "numeric", name = "local_temperature", property = "local_temperature", access = 1, unit = "°C", description = "Current temperature measured on the device", }, }, }, { type = "enum", name = "sensor_mode", property = "sensor_mode", access = 3, description = "What type of sensor are you using to measure the temperature of the floor?", values = { "room_temperature", "floor_temperature", "room_with_floor_limit" }, }, { type = "binary", name = "adaptive_start", property = "adaptive_start", access = 3, value_on = "ON", value_off = "OFF", description = "Preheat the room to the desired temperature before the scheduled start time.", }, { type = "numeric", name = "max_temperature_limit", property = "max_temperature_limit", access = 3, unit = "°C", min = 5, max = 35, value_step = 0.5, description = "Maximum temperature (default: 35 ºC)", }, { type = "numeric", name = "min_temperature_limit", property = "min_temperature_limit", access = 3, unit = "°C", min = 1, max = 5, description = "Minimum temperature limit for frost protection. Turns the thermostat on regardless of setpoint if the temperature drops below this.", }, { type = "enum", name = "boost", property = "boost", access = 3, description = "Override the schedule and boost at the current temperature until turned off", values = { "ON", "OFF" }, }, { type = "numeric", name = "display_brightness", property = "display_brightness", access = 3, min = 0, max = 100, value_step = 1, description = "Brightness of the display when in use", }, { type = "numeric", name = "holiday_start_stop", property = "holiday_start_stop", access = 3, min = 0, max = 99, description = "Set the number of days of holiday, this will start immediately.", }, { type = "numeric", name = "holiday_temperature", property = "holiday_temperature", access = 3, unit = "°C", min = 5, max = 35, description = "Holiday temperature", }, { type = "binary", name = "frost_protection", property = "frost_protection", access = 3, value_on = "ON", value_off = "OFF", description = "Turning on will keep heating at the minimum temperature limit", }, { type = "numeric", name = "switch_delay", property = "switch_delay", access = 3, unit = "s", min = 10, max = 90, value_step = 10, description = "How long to wait between making a change and it taking effect", }, { type = "numeric", name = "power_rating", property = "power_rating", access = 3, unit = "W", min = 0, max = 4500, value_step = 100, description = "How much power is the underfloor heating rated to. Entering a value will allow the Thermostat to record a value of power usage that can be checked under settings on the physical Thermostat", }, { type = "binary", name = "open_window_active", property = "open_window_active", access = 3, value_on = "ON", value_off = "OFF", description = "When active the heating will cut off if an Open Window is detected", }, { type = "numeric", name = "open_window_sensing_time", property = "open_window_sensing_time", access = 3, unit = "minutes", min = 1, max = 30, value_step = 1, description = "The duration that the drop in temperature needs to occur over", }, { type = "numeric", name = "open_window_drop_limit", property = "open_window_drop_limit", access = 3, unit = "C", min = 2, max = 4, value_step = 1, description = "The drop in ambient room temperature that will trigger an open window warning", }, { type = "numeric", name = "open_window_off_time", property = "open_window_off_time", access = 3, unit = "minutes", min = 10, max = 60, value_step = 5, description = "The length of time the drop in temperature must be consistent for to turn the heating off", }, } device.tuyaDatapoints = { { dp = 1, name = "system_mode", converter = "lookup" }, { dp = 2, name = "current_heating_setpoint", converter = "divideBy10" }, { dp = 4, name = "boost", converter = "lookup", lookup = { OFF = 1, ON = 2 } }, { dp = 18, name = "open_window_active", converter = "lookup" }, { dp = 45, name = "open_window_drop_limit", converter = "divideBy10" }, { dp = 37, name = "adaptive_start", converter = "lookup" }, { dp = 38, name = "local_temperature", converter = "divideBy10" }, { dp = 39, name = "max_temperature_limit", converter = "divideBy10" }, { dp = 42, name = "holiday_temperature", converter = "divideBy10" }, { dp = 43, name = "sensor_mode", converter = "lookup", lookup = { room_temperature = 0, floor_temperature = 1, room_with_floor_limit = 2 } }, { dp = 52, name = "frost_protection", converter = "lookup" }, { dp = 53, name = "min_temperature_limit", converter = "divideBy10" }, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_ha0vwoew", }, } return device