Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new fingerprint for ZY-M100-S #5990

Merged
merged 5 commits into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4154,7 +4154,6 @@ const definitions: Definition[] = [
{modelID: 'TS0601', manufacturerName: '_TZE200_wukb7rhc'},
{modelID: 'TS0601', manufacturerName: '_TZE204_xsm7l9xa'},
{modelID: 'TS0601', manufacturerName: '_TZE204_ztc6ggyl'},
{modelID: 'TS0601', manufacturerName: '_TZE204_qasjif9e'},
{modelID: 'TS0601', manufacturerName: '_TZE200_ztc6ggyl'}],
model: 'TS0601_smart_human_presence_sensor_1',
vendor: 'TuYa',
Expand Down Expand Up @@ -4184,7 +4183,7 @@ const definitions: Definition[] = [
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_sxm7l9xa']),
model: 'ZY-M100-S',
model: 'ZY-M100-S_1',
vendor: 'TuYa',
description: 'Mini human breathe sensor',
fromZigbee: [tuya.fz.datapoints],
Expand Down Expand Up @@ -4216,6 +4215,40 @@ const definitions: Definition[] = [
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_qasjif9e']),
model: 'ZY-M100-S_2',
vendor: 'TuYa',
description: 'Mini human breathe sensor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
e.illuminance_lux(), e.presence(),
e.numeric('target_distance', ea.STATE).withDescription('Distance to target').withUnit('m'),
e.numeric('radar_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(9).withValueStep(1)
.withDescription('sensitivity of the radar'),
e.numeric('minimum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
.withDescription('Minimum range').withUnit('m'),
e.numeric('maximum_range', ea.STATE_SET).withValueMin(0).withValueMax(9.5).withValueStep(0.15)
.withDescription('Maximum range').withUnit('m'),
e.numeric('detection_delay', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.1)
.withDescription('Detection delay').withUnit('s'),
e.numeric('fading_time', ea.STATE_SET).withValueMin(0.5).withValueMax(1500).withValueStep(1)
.withDescription('Fading time').withUnit('s'),
],
meta: {
tuyaDatapoints: [
[1, 'presence', tuya.valueConverter.trueFalse1],
[9, 'target_distance', tuya.valueConverter.divideBy100],
[104, 'illuminance_lux', tuya.valueConverter.raw],
[2, 'radar_sensitivity', tuya.valueConverter.raw],
[4, 'maximum_range', tuya.valueConverter.divideBy100],
[3, 'minimum_range', tuya.valueConverter.divideBy100],
[102, 'fading_time', tuya.valueConverter.divideBy10],
[101, 'detection_delay', tuya.valueConverter.divideBy10],
],
},
},
{
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_whkgqxse'}],
model: 'JM-TRH-ZGB-V1',
Expand Down