Thanks for the neat template! Yeah it took us a while to find a solution for the PIR. The full thread can be found here.