TimSoethout / goodwe-sems-home-assistant

Sensor for Home Assistant pulling data from the GoodWe SEMS API for solar panel production metrics.
88 stars 38 forks source link

When sun goes down PV sensor does not go to 0 Watt #24

Closed lukaskrepel closed 3 years ago

lukaskrepel commented 3 years ago

Hi, thanks for the sensor!

When the sun goes down the PV power sensor does not go to 0 Watt, but instead hangs on the last measured value.

spockz commented 3 years ago

I have this issue as well on the SEMS portal. I assume it is a bug on the api side where it keeps using the latest reported value in case of a missed shutdown message from the PV. (The last part is speculation.)

TimSoethout commented 3 years ago

We could divert from the API output by overwrite the PV power sensor to 0 when the inverter is off (found in another attribute). However, I don't know if this is correct in all cases, e.g. if you have batteries?

On Fri, 12 Feb 2021 at 23:39, Alessandro Vermeulen notifications@github.com wrote:

I have this issue as well on the SEMS portal. I assume it is a bug on the api side where it keeps using the latest reported value in case of a missed shutdown message from the PV. (The last part is speculation.)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TimSoethout/goodwe-sems-home-assistant/issues/24#issuecomment-778494635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQZ3BDQCSJIHPACZW6YYTS6WU3LANCNFSM4XROBIFA .

lukaskrepel commented 3 years ago

Sounds like a good solution for my case! I don't have a battery... I would assume the output would be zero for PV even with batteries, but I am not familiar with the SEMS portal API.

lukaskrepel commented 3 years ago

By the way: My current solution is to manually restart HA when the sun sets. The sensor goes to zero Watts. So I think the API simply doesn't respond when there's no power?

TimSoethout commented 3 years ago

In version 3.1.0 I added a check to report 0W when status is not 1. :)