SonnenladenGmbH / APsystems-EZ1-API-HomeAssistant

The APsystems EZ1 Integration offers a streamlined interface for interacting with the local API of APsystems EZ1 Microinverters using Home Assistant.
MIT License
77 stars 11 forks source link

Restart of daily production #34

Open patman15 opened 2 months ago

patman15 commented 2 months ago

Hi!

I'm having troubles with my statistics because the daily production counter restarts when the sun goes away and comes back. Mostly happens in the evening but also on very cloudy days. This causes further calculations that depend on that sensor to jump around. I would suggest to fix this by adding up the values of the inverter and reset only once at midnight. What do you think? As previously, I can also suggest a fix (PR) if you want me to.

See the issue here: daily_production

mawoka-myblock commented 2 months ago

Thanks for the offer, but I want this repo to get merged into HomeAssistant Core, so please don't open the PR here, but the PR is stuck at the moment, so I don't have a clue when this will get merged. You can check the PR here: https://github.com/home-assistant/core/pull/114531

patman15 commented 2 months ago

Ok understood, I'll do some local fixes and hope for the best for your PR :crossed_fingers:. Ping me if you want me to provide the fixes.

mawoka-myblock commented 2 months ago

Once it's merged, you can submit the fixes directly to HA. But I'm not sure the PR will ever get merged.

patman15 commented 2 months ago

But I'm not sure the PR will ever get merged.

I had a look at the code, are you sure that all prerequisites like the coding style are fulfilled? I had a quick look and my linters (ruff, pylint) show a number of issues.

mawoka-myblock commented 2 months ago

Will check that. Could be that the merges have messed sth up. It's been some weeks since I've checked everything.

mawoka-myblock commented 2 months ago

I've now fixed a new linter warning. The rules has been enabled in the last few weeks. Everything passes now.