Compare times

Fiasgardone:
Hello
Thanks for your comment
Well this code works, but since I also want to test sensors along with the schedules, I think the best option is with the (if)!
Of course, all ideas are welcome.

Why would it be a problem to test the sensors using the "else" construction? There is absolutely no functional difference. When do you want to test/not test the sensors? Tests are usually done "always".