Skip to content

Commit

Permalink
fix lookup index error
Browse files Browse the repository at this point in the history
  • Loading branch information
liangjia committed Dec 1, 2023
1 parent 1eb62d7 commit 0877c0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/converters/toZigbee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ const converters2 = {
utils.assertString(value, key);
value = value.toLowerCase();
utils.validateValue(value, Object.keys(lookup));
await entity.write('msOccupancySensing', { ultrasonicUToOThreshold: lookup[value]}, utils.getOptions(meta.mapped, entity));
await entity.write('msOccupancySensing', { ultrasonicUToOThreshold: utils.getFromLookup(value, lookup)}, utils.getOptions(meta.mapped, entity));

Check failure on line 638 in src/converters/toZigbee.ts

View workflow job for this annotation

GitHub Actions / ci

This line has a length of 156. Maximum allowed is 150

Check failure on line 638 in src/converters/toZigbee.ts

View workflow job for this annotation

GitHub Actions / ci

There should be no space after '{'
return { state: { occupancy_ult_sensitivity: value } };
},
convertGet: async (entity, key, meta) => {
Expand Down

0 comments on commit 0877c0f

Please sign in to comment.