Skip to content

Commit

Permalink
fix: Fix Tuya energy polling not working when measurement interval is…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Sep 12, 2024
1 parent 5a6c1f9 commit 861f8df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function onEventPoll(
globalStore.clearValue(device, key);
} else if (!globalStore.hasValue(device, key)) {
const optionsKey = `${key}_poll_interval`;
const seconds = toNumber(options[optionsKey] ?? defaultIntervalSeconds, optionsKey);
const seconds = toNumber(options[optionsKey] || defaultIntervalSeconds, optionsKey);
if (seconds <= 0) {
logger.debug(`Not polling '${key}' for '${device.ieeeAddr}' since poll interval is <= 0 (got ${seconds})`, NS);
} else {
Expand Down

0 comments on commit 861f8df

Please sign in to comment.