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

fix: state-error before state-warn #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rainieryoung
Copy link
Contributor

@rainieryoung rainieryoung commented Sep 2, 2023

Problem: Using an example battery level of 9% ... I believe the original logic would only return "state-warn" and never return "state-error"

Solution I re-ordered the thresholds. I'm not terribly well versed in js, so while this worked for me and I tested a couple ways to validate my assumptions about the syntax, I don't want to present this change as knowing more than I do.

Anyway, hopefully this is a useful submission. If it's off for whatever reason, feel free to discard.

Previously this appeared to have an if-then-else order of operations issue
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

Successfully merging this pull request may close these issues.

1 participant