Skip to content

Commit

Permalink
fix(detect): Detect _TZ3000_empogkya as Zemismart ZM-L03E-Z and `_T…
Browse files Browse the repository at this point in the history
…Z3000_lubfc1t5` as TuYa M10Z (#6281)

* fix(detect): Detect _TZ3000_empogkya and _TZ3000_lubfc1t5 as TuYa ZM-L03E-Z and M10Z

* Update zemismart.ts

* Update tuya.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
felipejfc and Koenkk authored Oct 15, 2023
1 parent c3e8a76 commit 2f60e66
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
25 changes: 22 additions & 3 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2161,9 +2161,7 @@ const definitions: Definition[] = [
],
},
{
fingerprint: [
{modelID: 'TS0003', manufacturerName: '_TZ3000_rhkfbfcv'},
],
fingerprint: tuya.fingerprint('TS0003', ['_TZ3000_rhkfbfcv', '_TZ3000_empogkya', '_TZ3000_lubfc1t5']),
model: 'TS0003_switch_3_gang_with_backlight',
vendor: 'TuYa',
description: '3-Gang switch with backlight',
Expand All @@ -2180,6 +2178,8 @@ const definitions: Definition[] = [
},
whiteLabel: [
tuya.whitelabel('Lonsonho', 'X703A', '3 Gang switch with backlight', ['_TZ3000_rhkfbfcv']),
tuya.whitelabel('Zemismart', 'ZM-L03E-Z', '3 gang switch with neutral', ['_TZ3000_empogkya']),
tuya.whitelabel('TuYa', 'M10Z', '2 gang switch with 20A power socket', ['_TZ3000_lubfc1t5']),
],
},
{
Expand All @@ -2205,6 +2205,25 @@ const definitions: Definition[] = [
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['TS0003'],
model: 'TS0003',
vendor: 'TuYa',
description: '3 gang switch',
extend: extend.switch(),
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
endpoint: (device) => {
return {'left': 1, 'center': 2, 'right': 3};
},
whiteLabel: [{vendor: 'BSEED', model: 'TS0003', description: 'Zigbee switch'}],
meta: {multiEndpoint: true, disableDefaultResponse: true},
configure: async (device, coordinatorEndpoint, logger) => {
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
},
},
{
fingerprint: tuya.fingerprint('TS0001', ['_TZ3000_tqlv4ug4', '_TZ3000_gjrubzje', '_TZ3000_tygpxwqa', '_TZ3000_4rbqgcuv']),
model: 'TS0001_switch_module',
Expand Down
19 changes: 0 additions & 19 deletions src/devices/zemismart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,6 @@ const definitions: Definition[] = [
// https://github.com/Koenkk/zigbee2mqtt/issues/3216
},
},
{
zigbeeModel: ['TS0003'],
model: 'ZM-L03E-Z',
vendor: 'Zemismart',
description: 'Smart light switch - 3 gang with neutral wire',
extend: extend.switch(),
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('center'), e.switch().withEndpoint('right')],
endpoint: (device) => {
return {'left': 1, 'center': 2, 'right': 3};
},
whiteLabel: [{vendor: 'BSEED', model: 'TS0003', description: 'Zigbee switch'}],
meta: {multiEndpoint: true, disableDefaultResponse: true},
configure: async (device, coordinatorEndpoint, logger) => {
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
},
},
{
fingerprint: [{modelID: 'TS0003', manufacturerName: '_TZ3000_vjhcenzo'}, {modelID: 'TS0003', manufacturerName: '_TZ3000_f09j9qjb'}],
model: 'TB25',
Expand Down

0 comments on commit 2f60e66

Please sign in to comment.