Skip to content

Commit

Permalink
feat(add): ZY-M100-24GV3 (#7909)
Browse files Browse the repository at this point in the history
* Add the "ZY-M100-24GV3" human body sensor. This version adds a "distance detection switch" to prevent excessive distance jitter from causing frequent congestion in Zigbee message reporting.

* ‘update’

* ‘update’

* update

* ‘update’

* Update tuya.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
yuanxin32323 and Koenkk authored Aug 27, 2024
1 parent e0b3480 commit 9acc033
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9794,6 +9794,86 @@ const definitions: Definition[] = [
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_ya4ft0w4']),
model: 'ZY-M100-24GV3',
vendor: 'Tuya',
description: '24G MmWave radar human presence motion sensor(added distance switch)',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [
e.enum('state', ea.STATE, ['none', 'presence', 'move']).withDescription('Presence state sensor'),
e.presence().withDescription('Occupancy'),
e.numeric('distance', ea.STATE).withDescription('Target distance'),
e.binary('find_switch', ea.STATE_SET, 'ON', 'OFF').withDescription('distance switch'),
e.illuminance_lux().withDescription('Illuminance sensor'),
e.numeric('move_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Motion Sensitivity'),
e.numeric('presence_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Presence Sensitivity'),
e
.numeric('detection_distance_min', ea.STATE_SET)
.withValueMin(0)
.withValueMax(8.25)
.withValueStep(0.75)
.withUnit('m')
.withDescription('Minimum range'),
e
.numeric('detection_distance_max', ea.STATE_SET)
.withValueMin(0.75)
.withValueMax(9.0)
.withValueStep(0.75)
.withUnit('m')
.withDescription('Maximum range'),
e
.numeric('presence_timeout', ea.STATE_SET)
.withValueMin(1)
.withValueMax(15000)
.withValueStep(1)
.withUnit('s')
.withDescription('Fade time'),
],
meta: {
tuyaDatapoints: [
[
1,
null,
{
from: function (v, meta) {
if (v == 0) {
return {
state: 'none',
presence: false,
};
} else if (v == 1) {
return {
state: 'presence',
presence: true,
};
} else if (v == 2) {
return {
state: 'move',
presence: true,
};
} else {
return {
state: 'none',
presence: false,
};
}
},
},
],
[2, 'move_sensitivity', tuya.valueConverter.raw],
[3, 'detection_distance_min', tuya.valueConverter.divideBy100],
[4, 'detection_distance_max', tuya.valueConverter.divideBy100],
[9, 'distance', tuya.valueConverter.divideBy10],
[101, 'find_switch', tuya.valueConverter.onOff],
[102, 'presence_sensitivity', tuya.valueConverter.raw],
[103, 'illuminance_lux', tuya.valueConverter.raw],
[105, 'presence_timeout', tuya.valueConverter.raw],
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_e9ajs4ft']),
model: 'CTL-R1-TY-Zigbee',
Expand Down

0 comments on commit 9acc033

Please sign in to comment.