Data collection - array accepting decimal numbers?

Hi Patrick,

thanks for this great plugin, very much used in our house!
Wonder if you can help on the following:

I’m trying to detect whether the power usage goes up when we turn on a pump (as currently, for some reason the z-wave switch is not reporting the watts), however our power meter reports the value as a decimal number, and this seems to cause problems for the array. Do I need to convert the number returned to a decimal?

Thanks in advance
Tony

What kind of problems are you having? Logic Summary is always preferable to screen shots, BTW.

Hi,

thanks for coming back so quick. From the screenshot the 2nd expression never evaluates to any values, I assume its because of the decimal numbers, as the same logic works fine for our bathroom humidity (which is integer values).

Final expression is the returned value, converted to a number, so the tonumber works fine, but as you can see, returns a decimal number.

Thanks

Decimal numbers aren’t a problem. Logic summary, please.

Hi Patrick,

logic summary emailed.

Thanks
Tony

1 Like

The control variable isint isn’t… it’s declared as isnt but used as isint, and that isn’t going to work. :smiley:

Thanks - sorry, been a long day…

Knew it had to be something simple!

1 Like

Man, I love the easy ones. Sorry my eyes weren’t better. I spotted it right away in the plain text of my editor, but it didn’t jump out in the screen shot. Is that text always gray-backgrounded for you? It’s not supposed to be. What browser are you using?

1 Like

No worries, still excellent service, as always.

I was using Edge, however I think I’d managed to select a large portion of the details, while taking the screenshot. Normally it appears fine.

1 Like