I am trying to use a calculation as the “below point” of a numeric state trigger. It is a subtraction of 2 float values, and displays as a float - but I get an error saying a float is required??
I used sensor.charging_stop_power_calc as the “below” point of my numeric value trigger.
(I added the extra pipe to float of the resulting subtraction to try and get it to believe it was a float - but as mentioned earlier, it displays with a decimal point anyway.)
Can you please show the automation that gives you the error?
For above: and below: in the numeric state trigger, you can only use input_numbers or hardcoded numbers, not sensors or anything else.
Also, as a random observation, the code you’ve posted looks like it has something else wrong with it based on the colours the forum’s highlighter is using. May be a glitch on the forums, but here’s a picture of how it usually formats code…
It is doing the calculation correctly (not that I can use it now seemingly anyway). I had trouble adding the 3 hyphen characters above and below the code in the post and getting the post to format correctly, so I’m not suprised it came out wrong.