How to create automation for temperature above/below a certain value?

Hi all,

I’m fairly new to HA and still figuring out how automations work.
I’m searching to create a automation based on the following situation but can’t figure it out yet and some help would be highly appreciated.

Situation:

In a room (garage/scullery) in my house I have a temperature sensor and two electric heaters, integrated via Tuya Smartlife app.

Automation:

I want to create the following:

When temperature in this room gets below 15 degrees both heaters should go switch to ‘on’ to heat the space back to 15 degrees.
When this temperature is met they should switch back to ‘off’ after 5 minutes or so.

What is the best way to configure this?
What triggers? Which actions? Etc.

Thanks in advance!

is a very good start

Or you can use a numeric_state trigger and set a “for:” time:

trigger:
  - platform: numeric_state
    below: 15
action:
  turn_on_actions_here

then in the off automation:

trigger:
  - platform: numeric_state
    above: 15
    for:
      minutes: 5
action:
  turn_off_actions_here