steve, like you have said before, without simplifying your code, you wont get it.

currently, with quick check, you need to be also in group led to get to that check.
as you don't have endif for led before checking with that code.

so, please, try with simpler code.
_________________________
!

download KiXnet