I have a global decimal variable that I'm getting errors on, and I don't understand what the log is telling me.
This global variable is a device parameter from a NUT device. Can someone assist me w/ this please? TIA
ChatGPT says (So please take with an appropriate amount of skepticism) to either subscribe to your actual UPS battery device, or change the enters range to a >=/<= comparison.
Why this breaks webCoRE internally:
MissingMethodException): When you save a piston, the webCoRE SmartApp attempts to set up event listeners (subscriptions) in Hubitat/SmartThings. It sees the trigger phrase enters_range and runs a specific Groovy routine designed only to handle hardware device parameters.{@UPS_Battery} instead of a physical device reference into that specific trigger routine, the backend code looks for physical device attributes (like a hardware Device ID or Network ID) that simply do not exist inside a variable container.MissingMethodException, and fails to initialize.![]()
You are looking at an integer range (number) but your variable is set to decimal. I would try changing the hub variable to a number, instead of a decimal.
That looks like a typical mismatched type error.
Edit: See reply below, I confirmed you just need to use a number variable instead of decimal.
But again, this is a global variable, and you can't subscribe to variables in webcore.... The error is pointing to an issue setting a subscription.
What do you mean? Of course you can.
What does my post about setting a global in a called piston not being available to the caller piston have to do with this?
This subscribes to a Hub Variable:
That is with a number variable (@@Test1). I confirmed it does not work with a decimal variable (@@Test2), as I suspected.
I stand corrected. Everything I looked up said that you could not subscribe to a variable and have it actually monitor a change in the variable.
AI has burned me on here as well... ![]()
Thanks guy! Ya'll the best!
AI has burned me as well....UGH....