I have a input value of sun radiation and want to control blinds with it. But the value is very unstable, so I want to react (shades down/up) only if the value remains above or below a threshold for a given time (e.g. 10minutes). Since I want to react faster if radiation increases then if it decreases the mean value is not optimal.
I was fiddling around with traffic and delay but come to good solution. any ideas where to look further?