Skip to content

Commit

Permalink
feat: Support schedule for TuYa TS0601_thermostat_3 and add `_TZE200_…
Browse files Browse the repository at this point in the history
…p3dbf6qs` and `_TZE200_rxntag7i` (#6067)

* Update tuya.ts

add ME168

* Update tuya.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
dyx052612 and Koenkk authored Aug 15, 2023
1 parent 57443a1 commit 3a948ab
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2645,13 +2645,18 @@ const definitions: Definition[] = [
'_TZE200_bvu2wnxz', /* model: 'ME167', vendor: 'Avatto' */
'_TZE200_6rdj8dzm', /* model: 'ME167', vendor: 'Avatto' */
'_TZE200_gd4rvykv', // Sanico
'_TZE200_p3dbf6qs', /* model: 'ME168', vendor: 'Avatto' */
'_TZE200_rxntag7i', /* model: 'ME168', vendor: 'Avatto' */
]),
model: 'TS0601_thermostat_3',
vendor: 'TuYa',
description: 'Thermostatic radiator valve',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
whiteLabel: [{vendor: 'Avatto', model: 'ME167'}],
whiteLabel: [
tuya.whitelabel('Avatto', 'ME167', 'Thermostatic radiator valve', ['_TZE200_bvu2wnxz', '_TZE200_6rdj8dzm']),
tuya.whitelabel('Avatto', 'ME168', 'Thermostatic radiator valve', ['_TZE200_p3dbf6qs', '_TZE200_rxntag7i']),
],
onEvent: tuya.onEventSetTime,
configure: tuya.configureMagicPacket,
exposes: [
Expand All @@ -2662,6 +2667,7 @@ const definitions: Definition[] = [
.withSystemMode(['auto', 'heat', 'off'], ea.STATE_SET)
.withRunningState(['idle', 'heat'], ea.STATE)
.withLocalTemperatureCalibration(-3, 3, 1, ea.STATE_SET),
...tuya.exposes.scheduleAllDays(ea.STATE_SET, 'HH:MM/C HH:MM/C HH:MM/C HH:MM/C HH:MM/C HH:MM/C'),
e.binary('scale_protection', ea.STATE_SET, 'ON', 'OFF').withDescription('If the heat sink is not fully opened within ' +
'two weeks or is not used for a long time, the valve will be blocked due to silting up and the heat sink will not be ' +
'able to be used. To ensure normal use of the heat sink, the controller will automatically open the valve fully every ' +
Expand All @@ -2678,6 +2684,13 @@ const definitions: Definition[] = [
[4, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
[5, 'local_temperature', tuya.valueConverter.divideBy10],
[7, 'child_lock', tuya.valueConverter.lockUnlock],
[28, 'schedule_monday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(1)],
[29, 'schedule_tuesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(2)],
[30, 'schedule_wednesday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(3)],
[31, 'schedule_thursday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(4)],
[32, 'schedule_friday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(5)],
[33, 'schedule_saturday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(6)],
[34, 'schedule_sunday', tuya.valueConverter.thermostatScheduleDayMultiDPWithDayNumber(7)],
[35, null, tuya.valueConverter.errorOrBatteryLow],
[36, 'frost_protection', tuya.valueConverter.onOff],
[39, 'scale_protection', tuya.valueConverter.onOff],
Expand Down

0 comments on commit 3a948ab

Please sign in to comment.