It looks as though Wait for Events/Condition never touched setting %device%, %value%, etc. I think it probably should.
So for your situation, you'd be able to lose that second test, and replace it with this, assuming you have a local variable called Timeout
Set Timeout to %device%
IF (Timeout = 'timeout') THEN
xxxxx
ELSE
yyyyy
ENDIF
Check out these logs from my testing, both with an event and a timeout:
From this rule: