Skip to content

Commit

Permalink
fix: Remove unsupported tamper from _TZ3000_n2egfsli and `_TZ3000_2…
Browse files Browse the repository at this point in the history
…mbfxlzr` (Koenkk#6244)

* Add 19DZT and exclude tamper for 19DZT and MC500A

* Update tuya.ts

---------

Co-authored-by: Koen Kanters <[email protected]>
  • Loading branch information
Chartreusito and Koenkk authored Oct 7, 2023
1 parent dece12c commit f99a503
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ const definitions: Definition[] = [
description: 'Door sensor',
fromZigbee: [fz.ias_contact_alarm_1, fz.battery, fz.ignore_basic_report, fz.ias_contact_alarm_1_report],
toZigbee: [],
exposes: [e.contact(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
whiteLabel: [
{vendor: 'CR Smart Home', model: 'TS0203'},
{vendor: 'TuYa', model: 'iH-F001'},
Expand All @@ -565,7 +564,16 @@ const definitions: Definition[] = [
tuya.whitelabel('Sber', 'SBDV-00030', 'Door sensor', ['_TYZB01_epni2jgy']),
tuya.whitelabel('TuYa', 'ZD08', 'Door sensor', ['_TZ3000_7d8yme6f']),
tuya.whitelabel('TuYa', 'MC500A', 'Door sensor', ['_TZ3000_2mbfxlzr']),
tuya.whitelabel('TuYa', '19DZT', 'Door sensor', ['_TZ3000_n2egfsli']),
],
exposes: (device, options) => {
const exps: Expose[] = [e.contact(), e.battery_low(), e.battery(), e.battery_voltage()];
if (!device || !['_TZ3000_2mbfxlzr', '_TZ3000_n2egfsli'].includes(device.manufacturerName)) {
exps.push(e.tamper());
}
exps.push(e.linkquality());
return exps;
},
configure: async (device, coordinatorEndpoint, logger) => {
try {
const endpoint = device.getEndpoint(1);
Expand Down

0 comments on commit f99a503

Please sign in to comment.