"Invalid config for [automation]: expected float for dictionary value @ data[‘below’]. Got None. "
I have tried to pipe data through float, without result. Replacing the attribute with a value works fine. Like this: below: 2.0
Eventually I would like to do some calculation and multiply the attribute value with a percentage value, but first of all I need to get the basic stuff working…
You can’t use templates in below: in numeric state triggers, so I’m guessing that goes for device triggers too (don’t use device automations by the way, they will make your life difficult, not easier).
Thanks, you made my day (hopefully…)! This was not easy to figure out for a newbie like me. Now, I don’t get any error logs any more at least. I need to wait a while before I can confirm the trigger works as espected as well. As far as I understand, the expression in the value_template will be evaluated every time any of the involved states are changed, and if the condition is true, the action will be executed.
So my intention is the setpoint should be increased by 2 degrees (restored to normal temp) when price is lower then a treshold value based on average price increased by X%. The action works fine, but the automation does not trigger. I expect it should trigger by any change in electricity price, average or the percentage value (input_number). Bothing happens when I change the percentage value. So I’m still lost unfortunately.
Finally I came up with a solution. I used a basic trigger for any change of price or percentage value. Then I added the condition with a template testing if price is higher/lower than the treshold.