Skip to content

Commit

Permalink
fix: Fix OWON PC321 current value (#7261)
Browse files Browse the repository at this point in the history
* Improve OWON PC321: add power factor and summation attributes

* Add produced_energy

* FIX: PC321 sum current

* fix add line twice

* revert produced_energy since it fail on test

* Fix Owon current factor missing
  • Loading branch information
dduransseau committed Mar 25, 2024
1 parent 2b1dd8a commit 9c5e61f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/devices/owon.ts
Expand Up @@ -99,7 +99,7 @@ const fzLocal = {
payload.power_reactive = value;
}
if (msg.data.hasOwnProperty('owonCurrentSum') || msg.data.hasOwnProperty('12547')) { // 0x3103 -> 12547
const data = msg.data['owonCurrentSum'] || msg.data['12547'];
const data = msg.data['owonCurrentSum'] || msg.data['12547'] * factor;
payload.current = data;
}
if (msg.data.hasOwnProperty('owonReactiveEnergySum') || msg.data.hasOwnProperty('16643')) { // 0x4103 -> 16643
Expand Down

0 comments on commit 9c5e61f

Please sign in to comment.