Define automation parameters using helper input

Hi All,
This is the scenario: I have a temperature sensor and a smart on/off switch in a guest room. I want the switch to turn on when temperature below a certain temperature.

This the automation in yaml:

alias: heat on off
description: ''
mode: single
trigger:
  - type: temperature
    platform: device
    device_id: 8773296105ec409bf965ba3e790724a5
    entity_id: sensor.temp_sensor_guest_room_2
    domain: sensor
    below: 15
condition: []
action:
  - type: turn_on
    device_id: f78ad064af4a003572bbf0f7870319c1
    entity_id: switch.on_off_plug_in_unit_17
    domain: switch

I would like to set the temperature (15 hardcoded at the moment) from a number type helper I created (input_number.guest_room_heater_ontemp)

Any ideas?

Thanks very much

Please move this to the proper category (Configuration) with tags (automation). This is not a finished project of sorts that’s being shared.

1 Like

Solved:
Use Generic Thermostat - Home Assistant

Having the same problem.
Here i share my automation code.

alias: Mantener Climatizador en 33 grados
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.sonoff_100124728a_temperature
condition:
  - condition: device
    type: is_on
    device_id: 18a8cd02f646642633ffe18de61d6d36
    entity_id: switch.sonoff_100110f768_1
    domain: switch
action:
  - if:
      - type: is_temperature
        condition: device
        device_id: 92bc574283143ad552535283e04e5f36
        entity_id: sensor.sonoff_100124728a_temperature
        domain: sensor
        below: 32 // "HERE IS WHERE I WANT TO USE MY HELPER: input_number.grados_caldera
    then:
      - type: turn_on
        device_id: 92bc574283143ad552535283e04e5f36
        entity_id: switch.sonoff_100124728a
        domain: switch
    else:
      - type: turn_off
        device_id: 92bc574283143ad552535283e04e5f36
        entity_id: switch.sonoff_100124728a
        domain: switch
mode: single
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.sonoff_100124728a_temperature
        below: input_number.grados_caldera
    then:

Reference: Numeric State Condition