Help required for switching on heater when temperature drops between certain

Hello,

Hoping someone can help a noob who’s new to HA.

For context, I have cheap electricity between 23:30 and 05:30 every day.

I want to create an automation that switches on my electric heater when the temperature drops below 19C only between 23:30 and 05:30. It must switch off when the temperature reaches 21C.

The temperature sensor and the smart switch to control the electric heater are both connected to HA.

Can someone help me?

Create a generic thermostat with the switch and temperature sensor.
Set the climate entity how you want.
Then add this automation:

description: ""
mode: single
triggers:
  - trigger: time
    at: "23:30:00"
    id: "on"
  - trigger: time
    at: "05:30:00"
    id: "off"
conditions: []
actions: 
- action: "climate.turn_{{ trigger.id }}"
  metadata: {}
  data: {}
  target:
    entity_id:
      - climate.electric_heater
1 Like

Thanks. I’ve given that a go. Much appreciated