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.
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.