Page 1 of 1

Heuristics for a Numeric Device State ?

PostPosted: Wed Aug 11, 2021 12:45 pm
by SearchCz
In my control pages, I use a thermometer graphic for my temperature sensors. I am trying to tweak them so that the mercury rises according to the temperature. I've created a set of graphics for this purpose and named them "ztemp+.png" and a whole bunch of "ztemp+#.png" where # is a numeric value like 0,2,4,6,8 etc.

But the only graphic that displays is "ztemp+.png". My temperatures are currently 27.4 and 25.6, so I was hoping to see ztemp+26.png make an appearance. I wonder what I got wrong about this. Any help is appreciated.

Re: Heuristics for a Numeric Device State ?

PostPosted: Wed Aug 11, 2021 12:57 pm
by Different Computers
I bet the value needs to match the file name number exactly.

Re: Heuristics for a Numeric Device State ?

PostPosted: Wed Aug 11, 2021 5:24 pm
by jay (support)
@Different almost got it - the heuristics only work with integers.

Re: Heuristics for a Numeric Device State ?

PostPosted: Wed Aug 11, 2021 6:05 pm
by SearchCz
I think it was the decimal values that derailed me. I wrote a little script to convert your temperature to an integer and all is well now. Suppose maybe I should be rounding the value off. Tomorrow