Prijsplafond sensor

I was able to make a calculation .
With help of the post below. I build further on that and updated my solution there: