Blynk 2.0, start timer

You need to restructure your code so that you don’t have blocking delay(xxxx) commands in your void loop, and so that your Blynk.virtualWrite commands aren’t in the void loop either.

Start by reading this:

It appears that your code is written to act as a thermostat with a hysteresis value that is adjustable via a slider. If this is one of your goals then using timers within your sketch, rather than automations, is probably a better solution.

This description…

Doesn’t really explain in sufficient detail the functionality you are looking for, and how it fits in with your existing (badly written) functionality.
Could you elaborate more?
Is this switch a physical switch, or a switch widget?
If the latter, then does this widget already exist, and if so which virtual pin is it attached to?

If you want to understand timers better then you should probably read this…

Pete.