I'm not sure what this was in response to, but if you're looking to
correct accidental changes your volume levels, and have an active
profile that controls your volume, try adding these:
Profile 1
Context: Display Off
Task:
Variable Set %RESTOREVOL = 1
Profile 2
Context: Variable Value %RESTOREVOL = 1
Enter Task:
Silent Mode Off If %RESTOREVOL < 0
Notification Volume %VOLN
Vibrate on Notify Off If %RESTOREVOL < 0
Ringer Volume %VOLR
Vibrate on Ringer Off If %RESTOREVOL < 0
Variable Clear %RESTOREVOL
This set of profiles tricks Tasker into reapplying the volume settings
for the currently active profile every time the display turns off.