I’m trying to trigger an automation, that will to turn off a switch if temperature is 66 degrees (or warmer). Below is my code. When I check it in developer tools/templates it returns the correct value, however the automation never triggers. Any help would be appreciated.
I can’t honestly say I fully understand templating & the nuances of syntax, but i feel that the ‘value_template’ line doesn’t look quite right to me. Too many quote characters i feel. Also, i do know that often templates like that are often placed on a new line. Perhaps something like this might make a difference.
I tried that and it seemed to only trigger when the temp was exactly 66. but if it say jumped from something under 66 to say 66.5 it would not trigger.
That sounds like you supplied a trigger to: state.
Don’t.
Then the automation will trigger on all state changes, then check the conditions to see if the value is above 66. If you need 66 and above 66 set the condition to above 65.99 instead.
Template warning: ‘float’ got invalid input ‘unknown’ when rendering template ‘"{{ states(‘sensor.multisensor_temperature’) | float >= 68}}"’’ but no default was specified. Currently ‘float’ will return ‘0’, however this template will fail to render in Home Assistant core 2022.1
That is referring to another issue with your template that would not have changed it’s operation until next year.
You will soon need to define a default for the |float filter. It can be as simple as changing |float to |float(0). However this would make no difference to your issue. Try my automation above.