Hi
I have several automations that control the heating, I have tado trv’s but the temp sensors are pretty poor so I use the temperature from xiaomi bluetooth temp sensors.
Anyway in the example below the heating comes on at 23c and goes off at 23.3c which keeps the room at a pretty constant temperature but this is not adjustable from the dashboard which is not wife friendly.
I have created a number helper as a temp selector, goes from 15 to 25 with 0.1 increments.
I’m guessing I can replace the IF conditions of 23 and 23.3 with a template that takes it’s value from the number helper and number helper +0.3
I have never used templates so help would be much appreciated
you can use templates in the numeric_state comparison (I’m pretty sure) but you should probably explicitly convert it to a number. I’m not sure if the system will auto convert the state string to number or if it will give an error because the numeric_state expects a number.
I believe you may be right, I’ve been trying with the templates and keep getting errors.
However using the number helper directly how would I get the +0.3??
thanks
the funny thing is I tested it with a template in my config before I posted to (try to) make sure I was remembering right and my config checker never complained at all. with either the string state or explicitly converted to a number.
Which is why I thought it might have been an undocumented feature.
i tried it in the template editor and it showed the correct result but when I put it in my automation it threw up an error when I tried to save the automation.
You can’t. My point was simply that below doesn’t accept a template, only a constant or an entity with a numeric value (like a sensor or input_number).
For your application, I suggest you consider using a Template Condition.
Here’s an example employing a Template Condition in shorthand notation.