Skip to content

Commit

Permalink
feat(add): GX04, GX03 (#8383)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Zheng <[email protected]>
Co-authored-by: Koen Kanters <[email protected]>
  • Loading branch information
3 people authored Dec 4, 2024
1 parent 36f5592 commit fcd5cf7
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,7 @@ const definitions: DefinitionWithExtend[] = [
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE284_aao3yzhs']),
fingerprint: tuya.fingerprint('TS0601', ['_TZE284_aao3yzhs', '_TZE284_nhgdf6qr']),
model: 'TS0601_soil_3',
vendor: 'Tuya',
description: 'Soil sensor',
Expand All @@ -2126,6 +2126,7 @@ const definitions: DefinitionWithExtend[] = [
[15, 'battery', tuya.valueConverter.raw],
],
},
whiteLabel: [tuya.whitelabel('GIEX', 'GX04', 'Soil Moisture Sensor', ['_TZE284_nhgdf6qr'])],
},
{
fingerprint: tuya.fingerprint('TS0601', [
Expand Down Expand Up @@ -13151,6 +13152,46 @@ const definitions: DefinitionWithExtend[] = [
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE284_8zizsafo']),
model: 'GX03',
vendor: 'GIEX',
description: 'GIEX 2 zone watering timer',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [
e.binary('valve_1', ea.STATE_SET, 'ON', 'OFF').withDescription('Switch state'),
e
.numeric('countdown_1', ea.STATE_SET)
.withValueMin(1)
.withValueMax(1440)
.withValueStep(1)
.withUnit('min')
.withDescription('Countdown timer for valve operation'),
e.binary('valve_2', ea.STATE_SET, 'ON', 'OFF').withDescription('Switch state'),
e
.numeric('countdown_2', ea.STATE_SET)
.withValueMin(1)
.withValueMax(1440)
.withValueStep(1)
.withUnit('min')
.withDescription('Countdown timer for valve operation'),
e.battery(),
],
meta: {
tuyaDatapoints: [
[1, 'valve_1', tuya.valueConverter.onOff],
[59, 'battery', tuya.valueConverter.raw],
[104, 'valve_1', tuya.valueConverterBasic.lookup({OFF: tuya.enum(2), ON: tuya.enum(0)})],
[2, 'valve_2', tuya.valueConverter.onOff],
[105, 'valve_1', tuya.valueConverterBasic.lookup({OFF: tuya.enum(2), ON: tuya.enum(0)})],
[13, 'countdown_1', tuya.valueConverter.raw],
[14, 'countdown_2', tuya.valueConverter.raw],
[15, 'battery', tuya.valueConverter.raw],
],
},
},
];

export default definitions;
Expand Down

0 comments on commit fcd5cf7

Please sign in to comment.