Determine if temperature is increasing or decreasing

Hi all,

Please let me explain my situation first. I have a Qubino dim module build, attached a temperature sensor. This sensor is in the wall. Therefore it is reacting Slowly and I want to use this sensor to turn on/off the heating.

So to make this sensor reliable I have to change it’s value.
First step is to know if the temperature is decreasing or increasing.

Is it possible to get the previous temperature and the current one and use that value in an automation to update a template sensor?

Yes, check

Maybe you can use the Trigger State Object?

I think the trend sensor would useful

1 Like

Do you really need to know whether it is increasing or decreasing? Maybe you could use the sensor in a generic thermostat?

Tnx for the responses so far! I wasn’t aware of the possibilities of the trend binary sensor. I think that is the way to go, so Im going to start with that one.

@PianSom tnx for your suggestion for the generic thermostat. For the following steps it a great idea, but first I have to fix the correctnes of the temperature measurements.

In general, perhaps make the graph the issue I have to solve a little easier to understand:


The sensor “Badkamer (rfx)” is the actual temperature, measured temporary to see what should be the correct temperature. The sensor “Badkamer” is the one that needs to be corrected to match the “Badkamer (rfx)”.

At this moment there is no heating availbe, so the temp changes are only because of the changing outside temperature. But within a few weeks the heating is installed and then the problem is increasing I guess.

If I understand you correctly, you want to adjust the value of “Badkamer” to more accurately reflect the real temperature (which you are temporarily determining using “Badkamer (rfx)”) - right? Are you envisaging that adjustment to be a fixed value added/subtracted (probably added!) to the Badkamer value?

If this is all that you want to do then maybe have a look at a sensor template, as discussed here for example.

Yes, that’s what I want to achieve for now.
I know I have to sometimes add and sometimes substract values. That’s exactly why I have to know if the temperature is higher or lower then the previous state.

But that I didn’t get working via a template sensor in one go. That’s why I asked the question.

You need a PID controller, it’s on my to-do. I don’t think the generic thermostat implements it