Temperatura as a variable to use it as a trigger or condition

Hi everybdoy.

This question is probbably dumb, but I’m quite new and don’t now much about automations.

I want to use as trigger or condition a certain value of the temperature of a water tank.
I can use the value of the temperature of the probe as trigger and condition, but the value can be changed during the year, so I’ll have to change the trigger or condition value in every automation.

Is there a way to set a variable (something like “tank temperature to start floor heating”) and relate the triggers and conditions to that variable wich in turn will be related to the value of the probe?

In this way, I only have to change the value in the variable and all the automations will be updated.

I hope I had explain myself propperly.
Thanks in advance.

Create a number helper would be my go to here.

You can put the number helper in the dashboard and then in your automations and scripts reference the number helper either via state of you want to use an exact value or via a numerical state if you want to use above and below or finally you can reference it in templates.

1 Like

Some examples:

trigger:
  - platform: numeric_state
    entity_id: sensor.water_tank_temperature
    above: input_number.tank_set_point
condition:
  - condition: numeric_state
    entity_id: sensor.water_tank_temperature
    above: input_number.tank_set_point
1 Like

Thanks so much for your answers @tom_l and @rossk, I’ll try and see.

@tom_l Sorry to bother again, I created the helper and used it in the automation. The configuration of the helper is this:


The value of the probe is this:
imagen
But the condition passes:

What am I doing wrong?
Thanks.

What is the input_number state set to?

Have you set it since creating it?

Its minimum 0 and máximum 30.

Yes but what is it set to, what value between 0 and 30?

Add it to an entities card in your dashboard and you will see a slider that you can set to any value between 0 and 30. What is it set to now?

A value above or below your sensor’s state?

1 Like

Sorry, I don’t know how to set it,

We both replied at the same time. See my last post above.

1 Like

Ah, yes, I did’t see the slider. Now I feel idiot! Thanks so much!

1 Like