app:26492021-11-17 08:26:58.945 am errorgroovy.lang.MissingMethodException: No signature of method: static java.lang.Float.parseFloat() is applicable for argument types: ([C) values: [83.22233] Possible solutions: parseFloat(java.lang.String) on line 62 (method updated)
I sat back and thought this through and realized maybe I misspoke and made an error on my own.
What I am doing is nothing more than turning an outlet on/off based on battery level. When I said it had been working, I was correct as the battery was getting charged. However, I hadn't really looked at the logs. What I believe was going on was the battery level, and thus evt.value, was coming in at integer values often enough to make it work. When it came in with a decimal it caused the error. But since it worked often enough I never caught the error.
Next thing I did, was when I was trying all those suggestions you guys gave me I was forcing an evt. Just dawned on me that that was not necessarily evt.value. So my bad. Sorry for all the trouble.
Net result, apparently the toInteger will work only if the string is an integer without decimals. Not sure I understand that, but it is what it is. I'm gonna stick with the toFloat as that seems to work no matter what.
Thanks again for all the help, and again sorry for the trouble.