I have a simple automation for my bathroom fan that it turns the fan on above a fixed humidity value and off below a different fixed humidity value. It was raining today and, the ambient humidity having gone up, the fan wouldn’t shut off. So I should use the humidity from my home thermostat as a baseline to turn the fan on and off and it would appear that a value_template is the way to do it within the automation in the GUI.
But I’m stuck on the syntax for asking to trigger on a minimum difference between two sensors.
The humidity in the bathroom is given by the entity sensor.aqara_th_mb_humidity whereas the house humidity is given by sensor.bedrooms_hallway_humidity
Should this work? I don’t seem to be able to test it in Developer Tools → Template and am afraid to put it into the automations.yaml without testing
value_template: '{{sensor.aqara_th_mb_humidity - sensor.bedrooms_hallway_humidity}}'
above: '10'