Another hour spent trying to find a solution before posting…
I have a number of temp sensors that feed an item showing the difference between the temperature and ambient temperature.
I am trying to create a widget/template that color codes the item depending on how above of below temperature it is.
I can get this to properly display a #FF0000 background as clearly both items are ‘==’ but I can’t get any ‘>’ or ‘<’ comparisons to work. What am I doing wrong?
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
2
I can see what you’re trying to achieve there.
You’ll need someone with better skills than me, but for what it’s worth, I’d suggest that you need to check that you’re not trying to do maths on string.
As in, are the Item values definitely numbers, without a Unit of Measurement ?
I thought it worked as removing the dimension and adding a > 0 changed it to blue where I didn’t get a color before…
But it doesn’t change if I reverse the > to <…
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
4
This isn’t my area of expertise.
Can you try without the UoM ?
(I don’t bother with UoM, I’m sure it looks nice, but it makes a mess for my rules. I just add it at the UI point, if I really need to know that a temperature is °c etc)
Looks like there was some inheritance between an item with a dimension and a calculation that had no dimension specified. I made it C_ITEMNAME:Dimensionless and the calculation appears to be working!