Skip to content

Commit 949b083

Browse files
authored
fix: Improvements to Tuya ZY-M100-24G ('_TZE204_ijxvkhd0') (#8229)
* Improvements to Tuya ZY-M100-24G ('_TZE204_ijxvkhd0') * Fix prettier complaints
1 parent c4296e0 commit 949b083

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

src/devices/tuya.ts

+27-14
Original file line numberDiff line numberDiff line change
@@ -10399,36 +10399,49 @@ const definitions: DefinitionWithExtend[] = [
1039910399
toZigbee: [tuya.tz.datapoints],
1040010400
configure: tuya.configureMagicPacket,
1040110401
exposes: [
10402-
e.enum('state', ea.STATE, ['none', 'presence', 'move']).withDescription('Presence state sensor'),
10403-
e.presence().withDescription('Occupancy'),
10404-
e.numeric('distance', ea.STATE).withDescription('Target distance'),
10405-
e.illuminance_lux().withDescription('Illuminance sensor'),
10406-
e.numeric('move_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Motion sensitivity'),
10407-
e.numeric('presence_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Presence sensitivity'),
10402+
e.enum('state', ea.STATE, ['none', 'presence', 'move']).withDescription('Presence state'),
10403+
e.occupancy(),
10404+
e.numeric('distance', ea.STATE).withUnit('m').withDescription('Target distance'),
10405+
e.illuminance_lux(),
1040810406
e
10409-
.numeric('radar_range', ea.STATE_SET)
10407+
.numeric('motion_sensitivity', ea.STATE_SET)
10408+
.withValueMin(1)
10409+
.withValueMax(10)
10410+
.withValueStep(1)
10411+
.withCategory('config')
10412+
.withDescription('Motion sensitivity'),
10413+
e
10414+
.numeric('occupancy_sensitivity', ea.STATE_SET)
10415+
.withValueMin(1)
10416+
.withValueMax(10)
10417+
.withValueStep(1)
10418+
.withCategory('config')
10419+
.withDescription('Occupancy sensitivity'),
10420+
e
10421+
.numeric('max_range', ea.STATE_SET)
1041010422
.withValueMin(1.5)
1041110423
.withValueMax(5.5)
1041210424
.withValueStep(1)
1041310425
.withUnit('m')
10426+
.withCategory('config')
1041410427
.withDescription('Maximum range'),
1041510428
e
10416-
.numeric('presence_timeout', ea.STATE_SET)
10429+
.numeric('occupancy_timeout', ea.STATE_SET)
1041710430
.withValueMin(1)
1041810431
.withValueMax(1500)
1041910432
.withValueStep(1)
1042010433
.withUnit('s')
10421-
.withDescription('Fade time'),
10434+
.withDescription('Occupancy timeout'),
1042210435
],
1042310436
meta: {
1042410437
multiEndpoint: true,
1042510438
tuyaDatapoints: [
10426-
[112, 'presence', tuya.valueConverter.trueFalse1],
10427-
[106, 'move_sensitivity', tuya.valueConverter.divideBy10FromOnly],
10428-
[111, 'presence_sensitivity', tuya.valueConverter.divideBy10FromOnly],
10429-
[107, 'radar_range', tuya.valueConverter.divideBy100],
10439+
[112, 'occupancy', tuya.valueConverter.trueFalse1],
10440+
[106, 'motion_sensitivity', tuya.valueConverter.raw],
10441+
[111, 'occupancy_sensitivity', tuya.valueConverter.raw],
10442+
[107, 'max_range', tuya.valueConverter.divideBy100],
1043010443
[109, 'distance', tuya.valueConverter.divideBy100],
10431-
[110, 'presence_timeout', tuya.valueConverter.raw],
10444+
[110, 'occupancy_timeout', tuya.valueConverter.raw],
1043210445
[104, 'illuminance_lux', tuya.valueConverter.raw],
1043310446
[102, 'illuminance_treshold_max', tuya.valueConverter.raw],
1043410447
[103, 'illuminance_treshold_min', tuya.valueConverter.raw],

0 commit comments

Comments
 (0)