Skip to content

Commit 2085336

Browse files
kasperiioKoenkk
andauthored
feat(add): TGM50-ZB (#8030)
* Device support: TGM50-ZB related to: Koenkk/zigbee2mqtt.io#3045 * prettier --fix * Apply suggestions from code review --------- Co-authored-by: kasperiio <None> Co-authored-by: Koen Kanters <[email protected]>
1 parent 6928928 commit 2085336

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

src/devices/tuya.ts

+67
Original file line numberDiff line numberDiff line change
@@ -6585,6 +6585,73 @@ const definitions: DefinitionWithExtend[] = [
65856585
],
65866586
},
65876587
},
6588+
{
6589+
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_mwomyz5n']),
6590+
model: 'TGM50-ZB',
6591+
vendor: 'Tuya',
6592+
description: 'Beok wall thermostat',
6593+
onEvent: tuya.onEvent({timeStart: '1970'}),
6594+
fromZigbee: [tuya.fz.datapoints],
6595+
toZigbee: [tuya.tz.datapoints],
6596+
configure: tuya.configureMagicPacket,
6597+
exposes: [
6598+
e.child_lock(),
6599+
e.temperature_sensor_select(['internal', 'external', 'both']),
6600+
e
6601+
.climate()
6602+
.withSystemMode(['off', 'heat'], ea.STATE_SET)
6603+
.withPreset(['manual', 'auto'])
6604+
.withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET)
6605+
.withRunningState(['idle', 'heat'], ea.STATE)
6606+
.withLocalTemperature(ea.STATE)
6607+
.withLocalTemperatureCalibration(-9.9, 9.9, 0.1, ea.STATE_SET),
6608+
e.enum('backlight_mode', ea.STATE_SET, ['off', 'always_low', 'always_mid', 'always_high']).withDescription('Intensity of the backlight'),
6609+
e.binary('frost_protection', ea.STATE_SET, 'ON', 'OFF').withDescription('Antifreeze function'),
6610+
e
6611+
.max_temperature_limit()
6612+
.withUnit('°C')
6613+
.withValueMin(15)
6614+
.withValueMax(90)
6615+
.withValueStep(0.5)
6616+
.withPreset('default', 60, 'Default value')
6617+
.withDescription('Maximum upper temperature'),
6618+
e
6619+
.numeric('temperature_delta', ea.STATE_SET)
6620+
.withUnit('°C')
6621+
.withValueMax(10)
6622+
.withValueMin(0.5)
6623+
.withValueStep(0.5)
6624+
.withPreset('default', 1, 'Default value')
6625+
.withDescription('The delta between local_temperature and current_heating_setpoint to trigger Heat'),
6626+
e.binary('factory_reset', ea.STATE_SET, 'ON', 'OFF').withDescription('Full factory reset, use with caution!'),
6627+
],
6628+
meta: {
6629+
tuyaDatapoints: [
6630+
[1, 'system_mode', tuya.valueConverterBasic.lookup({heat: true, off: false})],
6631+
[2, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
6632+
[3, 'local_temperature', tuya.valueConverter.divideBy10],
6633+
[4, 'preset', tuya.valueConverterBasic.lookup({manual: tuya.enum(0), auto: tuya.enum(1)})],
6634+
[9, 'child_lock', tuya.valueConverter.lockUnlock],
6635+
[15, 'max_temperature_limit', tuya.valueConverter.divideBy10],
6636+
[19, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration3],
6637+
[101, 'running_state', tuya.valueConverterBasic.lookup({heat: tuya.enum(1), idle: tuya.enum(0)})],
6638+
[102, 'frost_protection', tuya.valueConverter.onOff],
6639+
[103, 'factory_reset', tuya.valueConverter.onOff],
6640+
[106, 'sensor', tuya.valueConverterBasic.lookup({internal: tuya.enum(0), external: tuya.enum(1), both: tuya.enum(2)})],
6641+
[107, 'temperature_delta', tuya.valueConverter.divideBy10],
6642+
[
6643+
110,
6644+
'backlight_mode',
6645+
tuya.valueConverterBasic.lookup({
6646+
off: tuya.enum(0),
6647+
always_low: tuya.enum(1),
6648+
always_mid: tuya.enum(2),
6649+
always_high: tuya.enum(3),
6650+
}),
6651+
],
6652+
],
6653+
},
6654+
},
65886655
{
65896656
fingerprint: tuya.fingerprint('TS0222', ['_TZ3000_kky16aay', '_TZE204_myd45weu']),
65906657
model: 'TS0222_temperature_humidity',

0 commit comments

Comments
 (0)