Check when ent:Touch has stopped?

I want to change a variable when an ent touches another. When they stop touching, I’d change the variable back.
How is that done?

ENT:EndTouch

Cheers