Trigger based on a sensor value changing >X in <Y seconds

I have a large air compressor in my basement garage with 3/4 inch piping running up to and around my main garage. I automated the air compressor on/off and put a valve between the air compressor and the 300 feet of pipe running to and around my garage. I plan to keep this valve off to prevent slow leak down when not in use so I’m trying to find an easy way to automate opening the valve.

I also have two air pressure sensors, one before the valve (tank pressure) and one after the valve (line pressure). I’d really like to find a way to automate the valve to open once I demand air.

tl;dr - Is there a way to create a trigger in HA if the line pressure drops by more than 10psi in less than 20 seconds?

Because I know someone will say “just do a good job runing the pipe and there won’t be any leaks”. I did a great job with the piping and it is excellently sealed. But, there are well over 100 connections and I don’t use the system too often. With all those connections you will have some leak-down over a long period of time.

Set up a trend binary sensor with a min_gradient option to trigger on:

1 Like

Thanks for the help!!