MickMake / GoSungrow

GoLang implementation to access the iSolarCloud API updated by SunGrow inverters.
https://mickmake.com/
GNU General Public License v2.0
184 stars 48 forks source link

Issue with Energy dashboard in HA #109

Closed grf692 closed 8 months ago

grf692 commented 8 months ago

Hi,

I have an issue I don't manage to fix and wish to ask if one of you had the same behavior maybe.

In the Energy dashboard settings page, I've set the "today_energy" sensor to be used as Solar production.

When I look at the history of this sensor in HA I get the behavior I believe I should expect, everyday at midnight it is reset to 0 as you can see in the screenshot here:

image

But in my Energy Dashboard it shows as negative value everyday at midnight:

image

May anyone give me a hint on how to fix this please? Or what is the full name of the "sensor" you use? (I am in Europe/Sweden) Mine is GoSungrow xxx - SUNGROW GoSungrow getPsDetail.xxx.today_energy

Thanks!

JohnFLoki commented 8 months ago

That is because the sensor is resetting every day, but because it doesn't update before 0:00 Home Assistant calculates like that.

You can create an Utility Meter with "Periodically resetting" to address that.

grf692 commented 8 months ago

Thanks, I was not aware of these "creatures"! Now I've set a helpers as utility meter and it seems to work like a charm.

grf692 commented 8 months ago

Thanks, I was not aware of these "creatures"! Now I've set a helpers as utility meter and it seems to work like a charm.

mazvone commented 1 month ago

How did you that, can you write step by step?

JohnFLoki commented 2 weeks ago

@mazvone You go to settings -> Devices & Services -> Helpers (topside) -> create Helper -> Utility Meter -> Name: you do you Input sensor: sensor.[...]today_energy ... Periodically resetting: yes

Then add it to your energy dashboard when it so its first value.