squishykid / solax

🌞 Solax Inverter API Wrapper
MIT License
100 stars 57 forks source link

"Update" raise validation error for all zero response data #142

Closed VadimKraus closed 6 months ago

VadimKraus commented 6 months ago

reopened based on #68

--- text from other PR This is a possible solution for https://github.com/squishykid/solax/issues/67.

After this PR:

the response dict will be validate using a schema definition, therefore the access to the dict properties are more safe now the check includes a validation that at least one value in 'Data' is not 0 Consequences for Home assistant: If an zeros data event occurs, the validation error will cause the sensor update to fail and thereby the inherent home assistant retry will be triggered. No Changes to the solax integration are required.

VadimKraus commented 6 months ago

So I did some digging.

From my understanding voluptuous introduced an undisclosed breaking change when dealing with schemas in keys https://github.com/alecthomas/voluptuous/commit/41bc53df12c078a2fc9ea586a280605c53db5ea1

It used to work in voluptuous version 0.13.1

Working on a fix...

joseal commented 6 months ago

Any ETA to have this changed merged/deployed?

Darsstar commented 6 months ago

This PR can probably be closed since #68 has been merged.

VadimKraus commented 6 months ago

Actually this an updated version. please reopen. also #68 was reverted ....

Darsstar commented 6 months ago

~I don't see that in the master branch. I do see it reverted in the fix-node-versions branch.~