Closed tonki486 closed 11 months ago
Looks like I created this ticket too quickly. The energy entity started reporting data once a new day started.
It looks like the energy data only starts reporting the day after the S40 plug is first initialized. Or it was just a coincidence that the data started appearing after midnight. That would mean it takes multiple hours (at least 6h in my case) after adding a S40 plug to Home Assistant before the energy entity starts being populated. In any case, this is not a bug so I will close this issue.
The issue is with the S40 smart plug (US version). After enabling the energy entity, there is no data being populated and it always displays 0 kWh.
I thought that issue #1084 resolved the energy problem with the S40 plugs, but that one seems to be that the energy entity was entirely missing, while in my case, I can enable it, but it doesn't report anything. I also have S31 plugs, and the energy entities for those report data correctly.
I have included the diagnostics log below. While taking a look at the log, I notice that the energy data is present under the "dayKwh" property. Checking with the eWeLink app, the value of 0.02 kWh is correct.
sonoff-e5d5f5eea9a569ce516a340731f671e0-S40 - 3-b9cdf54a0a0b7aae963278b9ee7cd75b.json.txt
As a workaround, I know I could create a Riemann sum integral sensor + utility meter (daily reset) to achieve a similar result. But having the energy entity available without having to go through these extra steps would be more convenient.