I have set up an automation to charge my home battery and EV from the grid when prices drop below a set value. I have set up a helper on my dashboard so I can set the cost trigger at a given value depending on how much I need the power. Today, I set the trigger for 0.01 and the electricity price went to -0.02 and it did not trigger. My only guess is that it did not recognise the negative number. Have I got numbers and text mixed up? Or have I made a more obvious beginner error? I am just using the UI as I am not confident editing my own yaml yet.
Thanks
Just to add, price just went from .017 to 0.0 and it triggered.
Numeric triggers only trigger when you cross the threshold you set on the trigger. They do not fire if you’re already beyond the threshold and move to another position beyond the threshold.
1 Like
Thanks but going from say 0.015 to -0.02 is crossing the 0.01 threshold isn’t it?
I just thought, maybe its the number of decimal places?
Number of decimal places may affect it, but HA handles negative numbers without issue. It’s more than likely that it just didn’t cross the threshold when you think it did.
Thanks Petro. I’ll monitor a bit more and see what happens. Thanks for your help.