Skip to content

Commit

Permalink
JetHome WS7: Add some bugfix values in converter.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeepn committed Nov 23, 2023
1 parent 9e75b70 commit 4842c57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/devices/jethome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ const jetHome = {
cluster: 'genMultistateInput',
type: ['attributeReport', 'readResponse'],
convert: (model, msg, publish, options, meta) => {
const actionLookup = {0: 'release', 1: 'single', 2: 'double', 3: 'triple', 4: 'hold', 257: 'single', 258: 'double',
513: 'single', 514: 'double'};
const actionLookup = {0: 'release', 1: 'single', 2: 'double', 3: 'triple', 4: 'hold', 256: 'release', 257: 'single', 258: 'double',
259: 'triple', 260: 'hold', 512: 'release', 513: 'single', 514: 'double', 515: 'triple', 516: 'hold', 1024: 'release',
1025: 'single', 1026: 'double', 1027: 'triple', 1028: 'hold'};
const value = msg.data['presentValue'];
const action = utils.getFromLookup(value, actionLookup);
return {action: utils.postfixWithEndpointName(action, msg, model, meta)};
Expand Down

0 comments on commit 4842c57

Please sign in to comment.