Quick question regarding input numbers

Hi all,
I need to make 2 different input numbers, which I would like to change them manually, to use them in one automation. Say the first one is set to 28. If the automation is running and using the 28 input number, if I change it to 26 (manually) the automation will accept it and continue with 26 or I should reload the automation?

You do not need to reload the automation when you change the input number value.

Whenever the automation runs it will read the current state of the input number.

So it if I make it like a sensor would the above example would work? I need to use it in a climate automation for setting the desired temperature and one more int the same automation for setting a delay.

the automation is the following. Ideally I need a way to dynamically change the delay and the target temperature = 26.5

  alias: Bedroom AC stable temperature
  description: ''

  trigger:
   - platform: numeric_state
     entity_id: sensor.shelly1pm_349454789b5a_power
     for:
       hours: 0
       minutes: 1
       seconds: 30
     above: 60
   
     
  condition: []
  action:
    - service: climate.set_temperature
      data:
        temperature: 31
        hvac_mode: cool
      target:
        entity_id: climate.bedroom_ac
    - service: climate.set_fan_mode
      data:
        fan_mode: silence
      target:
        entity_id: climate.bedroom_ac  

    - delay:
        hours: 0
        minutes: 5
        seconds: 50
        milliseconds: 0
        
    - service: climate.set_temperature
      data:
        temperature: 26.5
        hvac_mode: cool
      target:
        entity_id: climate.bedroom_ac
    - service: climate.set_fan_mode
      data:
        fan_mode: silence
      target:
        entity_id: climate.bedroom_ac

A sensor would be ok - something like this (which is not working for the time being. Something is wrong

```- platform: template
  sensors:
    aux_air_condition_minutes_delay:
        friendly_name: aux_air_condition_minutes_delay
        value_template: >
          {% if (states.sensor.vrilissia_live_temperature.state) | int(0)  <= 31 %} 6
           {% elif (states.sensor.vrilissia_live_temperature.state) | int(0)  > 31.1 <= 34.5 %} 5
            {% elif (states.sensor.vrilissia_live_temperature.state) | int(0)  > 34.5 <=37.9 %} 4
             {% elif (states.sensor.vrilissia_live_temperature.state) | int(0)  > 38 < 40%} 3
               {% elif (states.sensor.vrilissia_live_temperature.state) | int(0)  > 40 %} 2
                {% endif %}

Now I have no idea what you are on about. That is completely unrelated to your original question. I see no input_numbers in your automation.

You are right. I tested today the above automation and it is working fine. But I realized that I need to change some values during the day. Ideally I need to change them dynamically, without a reload of the automation. The easiest way I thought would be manually with input number. Since this is not going to work I am wondering if a sensor would work.
Maybe I have to open a new thread?

In general, is there a way to change some values of an automation without a reload?

I just told you this will work.

In general, is there a way to change some values of an automation without a reload?

Yes. Like I said above.

You do not need to reload the automation when you change the input number value.

Whenever the automation runs it will read the current state of the input number.

1 Like

Sorry, you are correct again. I misread your initial answer apparently. Thanks Tom! I am going to change the automation.

If you create input numbers for your delay, and your target temperature then use these input number variables in the automation. The automation will use the current input variable number when it is executed.

1 Like

The only place you may get an unexpected result is in a numeric state trigger like this:

trigger: 
  - platform: numeric_state
    entity_id: sensor.foo
    above: input_number.bar

This trigger only monitors the sensor for changes. If you change the input number to be below the sensor state it will not cause a trigger.

The automation will still use the new input number value, but only next time the sensor changes.

If you want a trigger that monitors both entities for changes you have to use a template trigger.

trigger:
  - platform: template
    value_template: "{{ states('sensor.foo')|float(0) > states('input_number.bar')|float(0) }}"
2 Likes

Thanks for the advice. I will keep it in mind.