First, your trigger is going to be time, since you want to turn off the heat at 21:00.
- alias: Home Heater
trigger:
platform: time
at: '21:00:00'
In your action, you’re setting the heat to 26, not turning it off. I’m a bit confused by your code vs. what you’re saying. To turn the heat off, you’d use this:
Maybe I was not clear.
I want to open the the heat if is between 17:00 - 20:00 and the temperature is below 19 (I don’t know how to “find” the temperature sensor though) and at 21:00 to be off.
Ideally I would like if possible to be in one automation but if it can’t be done then I will go with 2 automations one for “ON” and one for turn it “OFF”
I just realized that when you said it didn’t work, you were using my code which didn’t have your thermostat name in there properly. Your change is correct.
So if you have that template trigger, when the current temperature goes below 19, it’ll trigger the automation to run, and perform whatever actions you specify.