local device = {} device.model = "TS0601_floor_thermostat" device.vendor = "Tuya" device.description = "Zigbee thermostat for electric floors" device.exposes = { { type = "climate", description = "Calibration floor temperature sensor", 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" }, }, { type = "enum", name = "running_state", property = "running_state", access = 1, description = "The current running state", values = { "idle", "heat" }, }, { 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 = "numeric", name = "local_temperature_calibration", property = "local_temperature_calibration", access = 3, unit = "°C", min = -9, max = 9, value_step = 0.1, description = "Offset to add/subtract to the local temperature", }, }, }, { type = "numeric", name = "deadzone_temperature", property = "deadzone_temperature", access = 3, unit = "°C", min = 0, max = 5, value_step = 1, description = "Floor temperature", }, { 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 = "text", name = "schedule_monday", property = "schedule_monday", access = 3, description = "Schedule for monday, example: \"HH:MM/C HH:MM/C HH:MM/C HH:MM/C\"", }, { type = "text", name = "schedule_tuesday", property = "schedule_tuesday", access = 3, description = "Schedule for tuesday, example: \"HH:MM/C HH:MM/C HH:MM/C HH:MM/C\"", }, { type = "text", name = "schedule_wednesday", property = "schedule_wednesday", access = 3, description = "Schedule for wednesday, example: \"HH:MM/C HH:MM/C HH:MM/C HH:MM/C\"", }, { type = "text", name = "schedule_thursday", property = "schedule_thursday", access = 3, description = "Schedule for thursday, example: \"HH:MM/C HH:MM/C HH:MM/C HH:MM/C\"", }, { type = "text", name = "schedule_friday", property = "schedule_friday", access = 3, description = "Schedule for friday, example: \"HH:MM/C HH:MM/C HH:MM/C HH:MM/C\"", }, { type = "text", name = "schedule_saturday", property = "schedule_saturday", access = 3, description = "Schedule for saturday, example: \"HH:MM/C HH:MM/C HH:MM/C HH:MM/C\"", }, { type = "text", name = "schedule_sunday", property = "schedule_sunday", access = 3, description = "Schedule for sunday, example: \"HH:MM/C HH:MM/C HH:MM/C HH:MM/C\"", }, } device.tuyaDatapoints = { { dp = 1, name = "system_mode", converter = "lookup" }, { dp = 16, name = "current_heating_setpoint", converter = "divideBy10" }, { dp = 24, name = "device_temperature", converter = "divideBy10" }, { dp = 27, name = "local_temperature_calibration", converter = "localTempCalibration2" }, { dp = 36, name = "running_state", converter = "lookup", lookup = { heat = 0, idle = 1 } }, { dp = 40, name = "child_lock", converter = "lockUnlock" }, { dp = 102, name = "local_temperature", converter = "divideBy10" }, { dp = 103, name = "deadzone_temperature", converter = "raw" }, { dp = 110, name = "schedule_monday", converter = "thermostatScheduleDayMultiDP" }, { dp = 109, name = "schedule_tuesday", converter = "thermostatScheduleDayMultiDP" }, { dp = 108, name = "schedule_wednesday", converter = "thermostatScheduleDayMultiDP" }, { dp = 107, name = "schedule_thursday", converter = "thermostatScheduleDayMultiDP" }, { dp = 106, name = "schedule_friday", converter = "thermostatScheduleDayMultiDP" }, { dp = 105, name = "schedule_saturday", converter = "thermostatScheduleDayMultiDP" }, { dp = 101, name = "schedule_sunday", converter = "thermostatScheduleDayMultiDP" }, } device.fingerprint = { { model = "TS0601", manufacturer = "_TZE200_edl8pz1k", }, { model = "TS0601", manufacturer = "_TZE204_edl8pz1k", }, { model = "TS0601", manufacturer = "_TZE204_6a4vxfnv", }, } return device