twrecked / lovelace-hass-aarlo

Lovelace card for hass-aarlo integration.
75 stars 23 forks source link

fix: state-error before state-warn #149

Open rainieryoung opened 1 year ago

rainieryoung commented 1 year ago

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.