Timer script Not Cancelling if state changes

Let me offer an alternate structure.

Trigger off any Thing status change.

Cancel any existing timer, regardless.

Examine the new status.

If it is OFFLINE, then set up a Timer to send an email in future. (No need to check status here.)

Note that if a sick Thing keeps bouncing on and off quicker than your timer, you’ll never get an email. Whether that can happen depends on the mystery Thing. Thing status is not a reliable guide to real availability, nor is it intended to be.