Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align watt-second/kilowatt-hour calculations with watts #20

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

jkeljo
Copy link
Owner

@jkeljo jkeljo commented Sep 4, 2023

We calculate watts as delta(consumed) - delta(produced), where delta(produced) could be 0 for non-net-metered channels, just based on the data in the packet. But Ws and kWh were being computed differently, using the net_metering setting on the channel to switch between them. This difference is unnecessary and confusing, so eliminating it.

We calculate watts as delta(consumed) - delta(produced), where
delta(produced) could be 0 for non-net-metered channels, just based on
the data in the packet. But Ws and kWh were being computed differently,
using the net_metering setting on the channel to switch between them.
This difference is unnecessary and confusing, so eliminating it.
@jkeljo jkeljo merged commit e5240fe into master Sep 4, 2023
3 checks passed
@jkeljo jkeljo deleted the fix_net_calculation branch September 4, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant