Skip to content

Commit

Permalink
Fix configure reporting error for TuYa TS0043 (#3539)
Browse files Browse the repository at this point in the history
* laratap is not support reporting

* fix lint

* Delete tuya.js.bak

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
nukusinji and Koenkk authored Dec 18, 2021
1 parent 8079cd6 commit f1ce214
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion devices/tuya.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ module.exports = [
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await reporting.batteryPercentageRemaining(endpoint);
try {
await reporting.batteryPercentageRemaining(endpoint);
} catch (error) {/* Fails for some*/}
},
},
{
Expand Down

0 comments on commit f1ce214

Please sign in to comment.