ksheumaker / homeassistant-apsystems_ecur

Home Assistant custom component for local querying of APSystems ECU-R Solar System
Apache License 2.0
166 stars 42 forks source link

fix: don't use solar_energy if 0 when it shouldn't be #246

Closed marcusds closed 3 months ago

marcusds commented 3 months ago

For more details see #245

This is untested and probably not the right way to do this, I'm not super familiar with Python or this project, but just thought I would give it a whack anyhow.

marcusds commented 3 months ago

Small sample size, but for the couple days I've been running this it's worked as intended.

I wonder if it's worth releasing a beta build for?

@HAEdwin

HAEdwin commented 3 months ago

@marcusds I now see what you mean by the second check on # of inverters. Strange this should not be happening. I'd rather would like to find out why this is possible. Give me some time and I'll release the beta.

marcusds commented 3 months ago

@HAEdwin Yeah I was wondering if the bug could be entirely worked around with how you are processing the data? I also wonder if that you can't work around it if the whole query should be scrapped because if some data is bad, maybe all data is bad?

HAEdwin commented 3 months ago

Looked into the raw data and put it through my ECU analyzer software, it's just a firmware bug because the checksum (length of datastream) and datamapping is correct so it is easy/better to apply a filter. This should be the final result then, agree?

marcusds commented 3 months ago

Sounds good