Skip to content

Commit

Permalink
feat(add): TRV603-WZ (#8443)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosik authored Dec 5, 2024
1 parent 92b2d55 commit a59fca8
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5334,6 +5334,100 @@ const definitions: DefinitionWithExtend[] = [
],
},
},
{
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE284_ymldrmzx'}],
model: 'TRV603-WZ',
vendor: 'Tuya',
description: 'Thermostatic radiator valve.',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
onEvent: tuya.onEventSetLocalTime,
configure: tuya.configureMagicPacket,
exposes: [
e.battery(),
e.child_lock(),
e.window_detection(),
e.binary('window', ea.STATE, 'OPEN', 'CLOSE').withDescription('Window status closed or open '),
e.enum('mode', ea.STATE_SET, ['auto', 'manual']).withDescription('Mode'),
e.binary('holiday_mode', ea.STATE_SET, 'ON', 'OFF'),
e.binary('heating_stop', ea.STATE_SET, 'ON', 'OFF'),
e
.climate()
.withLocalTemperature(ea.STATE)
.withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET)
.withLocalTemperatureCalibration(-30, 30, 0.1, ea.STATE_SET),
e.comfort_temperature().withValueMin(5).withValueMax(30).withDescription('Comfort mode temperature'),
e.eco_temperature().withValueMin(5).withValueMax(30).withDescription('Eco mode temperature'),
e.enum('screen_orientation', ea.STATE_SET, ['up', 'right', 'down', 'left']).withDescription('Screen orientation'),
tuya.exposes.frostProtection(),
e.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF'),
e.numeric('boost_time', ea.STATE_SET).withUnit('min').withDescription('Countdown in minutes').withValueMin(0).withValueMax(1000),
e.numeric('fault_code', ea.STATE).withDescription('Raw fault code'),
],
meta: {
tuyaDatapoints: [
[
2,
'mode',
tuya.valueConverterBasic.lookup({
auto: tuya.enum(0),
manual: tuya.enum(1),
}),
],
[4, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
[5, 'local_temperature', tuya.valueConverter.divideBy10],
[6, 'battery', tuya.valueConverter.raw],
[
7,
'child_lock',
tuya.valueConverterBasic.lookup({
LOCK: true,
UNLOCK: false,
}),
],
[14, 'window_detection', tuya.valueConverter.onOff],
[
15,
'window',
tuya.valueConverterBasic.lookup({
CLOSE: tuya.enum(0),
OPEN: tuya.enum(1),
}),
],
[21, 'holiday_temperature', tuya.valueConverter.divideBy10],
[36, 'frost_protection', tuya.valueConverter.onOff],
[39, 'switch_scale', tuya.valueConverter.raw],
[47, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration1],
[101, 'boost_heating', tuya.valueConverter.onOff],
[102, 'boost_time', tuya.valueConverter.countdown],
[103, 'schedule_monday', tuya.valueConverter.thermostatScheduleDayMultiDP_TRV602Z_WithDayNumber(1)],
[104, 'schedule_tuesday', tuya.valueConverter.thermostatScheduleDayMultiDP_TRV602Z_WithDayNumber(2)],
[105, 'schedule_wednesday', tuya.valueConverter.thermostatScheduleDayMultiDP_TRV602Z_WithDayNumber(3)],
[106, 'schedule_thursday', tuya.valueConverter.thermostatScheduleDayMultiDP_TRV602Z_WithDayNumber(4)],
[107, 'schedule_friday', tuya.valueConverter.thermostatScheduleDayMultiDP_TRV602Z_WithDayNumber(5)],
[108, 'schedule_saturday', tuya.valueConverter.thermostatScheduleDayMultiDP_TRV602Z_WithDayNumber(6)],
[109, 'schedule_sunday', tuya.valueConverter.thermostatScheduleDayMultiDP_TRV602Z_WithDayNumber(7)],
[110, 'holiday_mode', tuya.valueConverter.onOff],
[
111,
'screen_orientation',
tuya.valueConverterBasic.lookup({
up: tuya.enum(0),
right: tuya.enum(1),
down: tuya.enum(2),
left: tuya.enum(3),
}),
],
[112, 'antifrost_temperature', tuya.valueConverter.divideBy10],
[113, 'heating_stop', tuya.valueConverter.onOff],
[114, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration1],
[115, 'programming_mode', tuya.valueConverter.raw],
[116, 'eco_temperature', tuya.valueConverter.divideBy10],
[117, 'comfort_temperature', tuya.valueConverter.divideBy10],
[118, 'fault_code', tuya.valueConverter.raw],
],
},
},
{
zigbeeModel: ['TS0121'],
model: 'TS0121_plug',
Expand Down

0 comments on commit a59fca8

Please sign in to comment.