Skip to content
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

Invalid value for "max_discharge_current" : 200.000015 (range 1.0 - 200.0) #381

Closed
Jalle19 opened this issue Oct 19, 2023 · 4 comments
Closed

Comments

@Jalle19
Copy link
Contributor

Jalle19 commented Oct 19, 2023

My Home Assistant keeps complaining in the logs about this:

Invalid value for number.jk_bms_max_discharge_current: 200.000015 (range 1.0 - 200.0)

@syssi
Copy link
Owner

syssi commented Oct 20, 2023

I will have a look!

@Jalle19
Copy link
Contributor Author

Jalle19 commented Oct 20, 2023

Seems like a classic floating point comparison issue. Not sure what the best fix would be, perhaps change the whole thing to use integers instead? I doubt anyone desperately needs to set discharge current to sub-ampere accuracy.

@syssi
Copy link
Owner

syssi commented Oct 20, 2023

If pushed a fix which relaxes the upper limit. If the value passes the validation it should be handled/rounded properly.

@Jalle19
Copy link
Contributor Author

Jalle19 commented Oct 20, 2023

Yeah I guess that works too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants