Using a variable in an automation?

I use an ispindel device to report various home brewing parameters to HA using MQTT. I currently have automations in place to turn a fridge and heater on and off depending on the sensor values reported.
If I want a target temp of ~18deg, I set the fridge to come on at 18.2 and off at 17.8… pretty basic stuff.
If I want to change this temperature, I currently have to edit the various automations to change these hard coded values.
I would like to implement a new variable using a slider (target_temp) and build this into the automations so they are dynamic and data driven.

One of the current automations looks like this:

- id: '1645475728120'
  alias: MQTT Brew Fridge on
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: sensor.ispindle_temp
    above: '18'
  condition: []
  action:
  - type: turn_on
    device_id: 96777ee75e042a4db19379491af935ea
    entity_id: switch.1280058070039f10b8b1
    domain: switch
  mode: single

How do I amend the 'above: 18' to be target_temp + 0.2 ?
I don’t think I can use a value template directly here?
Do I need to create another dynamic variable set for the actual values I want to switch on and then use these in the automation? Rather than doing the simple maths in the automation itself?

Here is an example if how i’ved used input number to custom trigger an automation…

  trigger:
    - platform: template
      value_template: "{{states('sensor.bom_weather_wind_speed_kt') | float(0) > states('input_number.wind_limit_driveway') | float(0)}}"

How about using this instead of automations?

Or if you want heating and cooling:

It will appear as a thermostat you can set in your dashboard:

Screenshot 2022-05-13 at 20-22-23 Overview – Home Assistant

The thermostat approach looks very very interesting! Good idea… thanks!