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

Use different divider for Gen 2 power meters #68

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

mlq
Copy link
Contributor

@mlq mlq commented Apr 14, 2022

There are different reports discussing a invalid reported total_consumption for Shelly Plus devices. I think the root cause of this issue is that pyShelly divides the obtained data by 60 and, thus, converting from Wh to Wm. ShellyForHass assumes that the unit is Wh.

This PR changes the divider for Gen 2 devices. While the other reports only mentioned Gen 2 devices, I assume that the previous generation might also be affected but I do not have any of those devices. Therefore, the patch only applies this change to Gen 2. Please note that I am not experienced with this code base, so my approach might be not the right one but it could hint to a solution that would fix this issue.

@andrepcg
Copy link

@hakana Any plans on merging this? I'm having the same issue with total power consumption for Gen 2 devices.
Thank you

@hakana hakana merged commit 83462e7 into StyraHem:master Apr 27, 2022
@hakana
Copy link
Contributor

hakana commented Apr 28, 2022

Will be a release with it tomorrow!

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.

3 participants