Closed ghallford closed 1 year ago
Do not think this is a bug. Each variable is a STRING. Using β+β causes concatenating β250.0β and β40β which gives β250.040β. Using β-β causes converting both values to integers and gives β210β. To avoid any issues I usually use something like: parseFloat(states['input_number.probe4targettemp'].state) - 20
An answer was provided, no further remarks were added. Closing as solved.
Checklist:
Release with the issue: 1.3.6
Last working release (if known):
Browser and Operating System: Chrome, Windows 11
Description of problem: I am trying to put in a gauge graph, where there is a yellow and red for to low and yellow and red for too high. The low part work fine but the high part, using the addition doesn't add properly.
If I set "input_number.probe4targettemp" to 250. Expected vars are:
vars[0] = 230 vars[1] = 210 vars[2] = 270 vars[3] = 290
What I am getting is this:
vars[0] = 230 vars[1] = 210 vars[2] = 250.020 vars[3] = 250.040
Why???? Addition is adding decimal places and not whole numbers
Here is the yaml.
Javascript errors shown in the web inspector (if applicable):
Additional information: