[Tasker] Silent your phone after turning it face down for longer than 10 seconds

Update:

Amjan noticed (see comments below) that this task won't work if you have your "Proximity Sensor watching" not enabled in Tasker, therefore do the following before you start:
Press "menu key" while in Tasker -> "Preferences" -> "Monitor" tab -> Search for the label "Proximity Sensor" and select "Yes".

It is a very simple but also very effective Tasker profile is to silent your phone by turning it face down. Instead of turning it instantly into silent mode I want to show you a way to wait for a certain time before muting it. Therefore you reduce the chance to mute it by accident.

The trick is to create two Tasker profiles. The first one sets a global variable to 1 when the phone is turned face down and to 0 if its not in this state any more. The second profile is activated when the global variable is changed to 1. In the task the second profile launches there is a wait (f. e. 10 seconds) followed by a check if the global variable is still set to 1. If the check evaluates to true, then the phone is still in the face down state and it is turned silent.

Here is the complete code:

Profile: Display down

State: Orientation [ Is:Face Down ]
Enter: Display down on
A1: Variable Set [ Name:%SCRDWN To:1 Do Maths:Off Append:Off ]

Exit: Display down off
A1: Variable Set [ Name:%SCRDWN To:0 Do Maths:Off Append:Off ]
A2: If [ %TMPSILENT ~ 1 ]
A3: Silent Mode [ Mode:Off ]
A4: Variable Set [ Name:%TMPSILENT To:0 Do Maths:Off Append:Off ]
A5: End If

Profile: Turn silent

Event: Variable Set [ Variable:%SCRDWN Value:1 ]
Enter: Silent
A1: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A2: If [ %SCRDWN ~ 1 ]
A3: If [ %SILENT ~ off ]
A4: Silent Mode [ Mode:On ]
A5: Variable Set [ Name:%TMPSILENT To:1 Do Maths:Off Append:Off ]
A6: End If
A7: End If