Switch/Group changed Rule not working as expected

Have you installed the expire binding?

Does item ever go ON? Inspect events.log
Does your rule send it an OFF before it expires? Inspect events.log
Does your rule send it another ON before it expires? This you won’t see in events.log, because updates-to-same are not logged.
But it’s easy to make a diagnostic rule to trigger and report updates.

Please don’t use while-sleep in a finished rule, it is horribly bad practice.

Here is a sleep free countdown technique.