What exactly do you mean by “scheduled”? E.g., do you mean only allow the switch (i.e., heater) to be turned on during a certain period (5:30 - 21:30)? Do you mean change the target temperature at different times? Or something else?
BTW, you’ve only described turning the switch on, but I would assume you also want it to turn off when the temperature rises above the target temperature. Is that right? And (depending on the answers to the questions above) maybe turn it off outside the specified time period, yes?
If I understand your setup correctly you have a sensor that indicates the current temperature, and a switch that turns the heater on and off. Is that right?
Assuming I understand what you want to do, then the Generic Thermostat should still work. When “turned on” (or set to heat mode) it will automatically control the heater (via the switch entity) based on the temperature indicated by the sensor. When “turned off” it will simply turn the switch (i.e., heater) off. Then all you need to “schedule” it are automations that turn it on and off. Something like:
- alias: Thermostat on
trigger:
platform: time
at: 05:30:00
action:
service: climate.turn_on
entity_id: climate.my_thermostat
- alias: Thermostat off
trigger:
platform: time
at: 21:30:00
action:
service: climate.turn_off
entity_id: climate.my_thermostat
This has the added benefit of having typical “thermostat” features such as minimal cycle times, hysteresis, away mode, etc. that should protect your heater and give you more operational capabilities, and also a climate entity in the front end that gives you manual control, etc., etc.
But if you really would rather create your own automations to directly control the heater, then what you need are some additional triggers and conditions, something like:
- alias: termostato on
hide_entity: true
trigger:
- platform: numeric_state
entity_id: sensor.my_sensor
above: 19
- platform: time
at: 05:30:00
- platform: homeassistant
event: start
condition:
- condition: numeric_state
entity_id: sensor.my_sensor
above: 19
- platform: time
after: 05:30:00
before: 21:30:00
action:
...