mykhailog / hacs_waveshare_ups_hat

Waveshare UPS Hat integration for Home Assistant.
MIT License
19 stars 9 forks source link

Difference between power and power_calculated #2

Open txespirito opened 2 years ago

txespirito commented 2 years ago

What is the difference between the "power" and "power_calculated" attributes? As much as I analyze it, I do not understand where the power value comes from, many times it is very different from the calculated power. Thanks

mykhailog commented 1 year ago

power value comes directly from Waveshare UPS HAT and power_calculated is calculated based on voltage and current.

I've got this code directly from official SDK