Telegram + 9x gpio-multi-function-lights + P.I.R + dash all working ;) but need help with a function

Take a look at this thread. How do I only pass a motion sensor change between dusk and dawn?