Skip to content

Commit

Permalink
feat(add): ZY-M100-24G @VladKorr Koenkk/zigbee2mqtt#18237
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Aug 5, 2023
1 parent 3298895 commit 39f13a9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5725,6 +5725,37 @@ const definitions: Definition[] = [
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_ijxvkhd0']),
model: 'ZY-M100-24G',
vendor: 'TuYa',
description: '24G MmWave radar human presence motion sensor',
configure: tuya.configureMagicPacket,
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
e.illuminance_lux(), e.presence(),
e.enum('presence_state', ea.STATE, ['none', 'present', 'moving']).withDescription('Presence state'),
e.numeric('motion_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Motion sensitivity'),
e.numeric('detection_distance_max', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1)
.withDescription('Max detection distance').withUnit('m'),
e.numeric('detection_distance_min', ea.STATE).withDescription('Min detection distance').withUnit('m'),
e.numeric('fading_time', ea.STATE_SET).withValueMin(1).withValueMax(15).withValueStep(1).withDescription('Delay time').withUnit('s'),
e.numeric('presence_sensitivity', ea.STATE_SET).withValueMin(1).withValueMax(10).withValueStep(1).withDescription('Presence sensitivity'),
],
meta: {
tuyaDatapoints: [
[104, 'illuminance_lux', tuya.valueConverter.raw],
[105, 'presence_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'present': tuya.enum(1), 'moving': tuya.enum(2)})],
[106, 'motion_sensitivity', tuya.valueConverter.divideBy10],
[107, 'detection_distance_max', tuya.valueConverter.divideBy100],
[109, 'detection_distance_min', tuya.valueConverter.divideBy100],
[110, 'fading_time', tuya.valueConverter.raw],
[111, 'presence_sensitivity', tuya.valueConverter.divideBy10],
[112, 'presence', tuya.valueConverter.trueFalseEnum1],
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sbyx0lm6']),
model: 'MTG075-ZB-RL',
Expand Down
1 change: 1 addition & 0 deletions src/lib/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ export const valueConverter = {
from: (v: boolean) => !v,
},
trueFalseEnum0: valueConverterBasic.trueFalse(new Enum(0)),
trueFalseEnum1: valueConverterBasic.trueFalse(new Enum(1)),
onOff: valueConverterBasic.lookup({'ON': true, 'OFF': false}),
powerOnBehavior: valueConverterBasic.lookup({'off': 0, 'on': 1, 'previous': 2}),
powerOnBehaviorEnum: valueConverterBasic.lookup({'off': new Enum(0), 'on': new Enum(1), 'previous': new Enum(2)}),
Expand Down

0 comments on commit 39f13a9

Please sign in to comment.