Skip to content

Commit

Permalink
feat(add): SWS6TZ-WHITE (#5927)
Browse files Browse the repository at this point in the history
* Adding support for TZE200_8eazvzo6

* Fixed syntax error

* Fixed the syntax error for datapoints

* Removed trailing-spaces and tabs per Lint requirements

* Fixed indentation issues

* Update tuya.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
nuwan-perera-au and Koenkk authored Jun 30, 2023
1 parent 1ff7011 commit 9132fca
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4994,6 +4994,41 @@ const definitions: Definition[] = [
],
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_8eazvzo6']),
model: 'SWS6TZ-WHITE',
vendor: 'TuYa',
description: '6 gang wall switch',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [
e.switch().withEndpoint('l1'),
e.switch().withEndpoint('l2'),
e.switch().withEndpoint('l3'),
e.switch().withEndpoint('l4'),
e.switch().withEndpoint('l5'),
e.switch().withEndpoint('l6'),
e.current(), e.power(), e.voltage(),
],
endpoint: (device) => {
return {'l1': 1, 'l2': 1, 'l3': 1, 'l4': 1, 'l5': 1, 'l6': 1};
},
meta: {
multiEndpoint: true,
tuyaDatapoints: [
[1, 'state_l1', tuya.valueConverter.onOff],
[2, 'state_l2', tuya.valueConverter.onOff],
[3, 'state_l3', tuya.valueConverter.onOff],
[4, 'state_l4', tuya.valueConverter.onOff],
[5, 'state_l5', tuya.valueConverter.onOff],
[6, 'state_l6', tuya.valueConverter.onOff],
[21, 'current', tuya.valueConverter.divideBy1000],
[22, 'power', tuya.valueConverter.divideBy10],
[23, 'voltage', tuya.valueConverter.divideBy10],
],
},
},
];

module.exports = definitions;

0 comments on commit 9132fca

Please sign in to comment.