Comparative sensor values as triggers

Sensor values can be triggers when the value is above or below a fixed, stated number. I would like them to be triggers when they are above or below

  • a variable
  • another sensor value
  • recent values from the same sensor.

I want my bathroom fan to run when the bathroom humidity is higher than the humidity in the next room. When it’s triggered by absolute humidity, it ends up running in the summer when I just open the window on a nice day.

I would like my bathroom fan to run when the humidity in that room increases by more than ten percent in one minute, and run until the value returns within five percent of the valuse at the time of trigger.

I want my kitchen exhaust fan to run when the kitchen temperature is higher than the temperature in the next room. Right now, I have to keep changing the appropriate trigger temperature to match my heating and cooling, or the ambient weather when my kitchen windows are open on a nice day.

I want my kitchen exhaust fan to run when the room warms by five degrees over five minutes, and run until the temperature is no longer increasing, or until it is within five degrees of the average temperature of the adjacent rooms.

While more options are generally always welcome, I suspect the general response to this feature request is that this is already easily accomplished with existing functionality.

Your first two bullet points, and first and third example cases, should only require adding an automation condition.

The third bullet, and second and fourth example cases, could probably be accomplished by also adding say a derivate helper sensor.

You could try and use the following.

A varriable: create a helper which is defined by the value of the variable. I use this for heating: I use two sensors to measure the room temperature. 1 at 1,5m, and one on floor level. So heating comes on when either the ambient temperature at 1.5 is below a setpoint and when the floor level is under another setpoint. For this I use a template:

I my case that looks like this for the setpoint temperature attribute of my heating:

{{ state_attr(‘climate.01_245354_00’, ‘temperature’) | float }}

For comparison of the state with another sensor, just use the above or below another entity one

And lastly, for changes over time you can create a derivative sensor. Which will give a number for rising or lowering of a value over time.

This is a template sensor.
It exists.