-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(x1_boost): totals are consecutive u16 ints #129
Conversation
from real world example
hey @squishykid, the values for the test case are from our X1 Boost inverter. We have been using the Solax plugin in HomeAssistant, but unfortunatelly, some of the values are wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. One change with your tests though: could you please add another set of expected values, rather than modifying the existing set of expected values?
The existing set of expected values is output from a known inverter, and we want that to continue working. So your new values and the existing values should coesist
I've added the new text case for the overflown case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking right on track! You just need to reference your new test values in ‘fixtures.py’, so the tests run with your new values in addition to all of the existing values.
Do this by adding another ‘ InverterUnderTest’ in fixtures.py, referencing your new test values |
I should've checked! Fixture added. |
Nice work! |
Thanks! How do new versions get released? I'd need this fix for updating the deps in here. |
Hello thanks guys. Just tested with the very last git version today. I don't know if this is the right place to post. I'm still getting some data though. From first look the data seems OK. |
This is what I have experienced also. The values mostly line up but the exported power/power now values are not lined up so will not work, also the x1 boost Gen 3 uses a pack_u16 to combine a few values so some of the total values will be off. I have changed this manually on the x1 mini v34 file and got it reporting correct values but haven't delved into it on how to get it to register as an x1 boost on initial discovery. |
Total values are two consecutive unsigned 16bit integers for X1 Boost inverter.