-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
[BUG] Wrong total consumption #638
Comments
I have same problem at Shelly Pro 4PM. all other device show this value correct. |
I have the same issue, also Shelly Pro 4PM. |
I used MQTT explorer to monitor the traffic between HA and MQTT server The results are strange: Power 9,1W and voltage 229,9 implies current 0,03958A, not 0.198. Power and voltage are as expected, so the current must be wrong. Also, the total consumption seems to be wrong. I calculated difference in the 20min interval. |
MQTT sends correct data in terms of total consumption. I approved this with several independent meter. I do not know why integration incorrectly calculates the result, but it seems that some changes to const.py could help. I am working on it. |
Fixed using native Shelly integration. configuration.yaml must be edited. switch:
sensor:
|
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. I have written a small patch for pyShelly that changes this behavior for Gen 2 devices and the values look more plausible. However, I am not experienced with this code base. While all the reports here suggest that it only affects Gen 2, I would assume that it might apply to the previous generation as well but I don't have any device to test that. Maybe someone can verify this and we can send the patch as a pull request. |
It is not Shelly for HASS, it is e different integration. Is it correct? |
ShellyForHASS is using pyShelly as a dependency to communicate with the devices. In my installation, version 0.3.5 is installed to |
I believe this is exactly what's happening. I divided the reported total consumption in HA by 60 and now it matches the |
Possible and simple solution - Specific device setting in configuration.yaml for the affected devices: |
The pull request has been merged and should be included in tomorrow's release. |
Better to install new release now ;) |
Environment
I use a Shelly Plus 1PM with FW 0.9.1. The "Total consumption" in HASS is totaly wrong, I have the Shelly running since few days by 1165 W and the total consumption shows only 0.81 kWh.
The text was updated successfully, but these errors were encountered: