How to only fire off a rule if a contact is closed

Here is my rule that triggers a dog bark through the garden Sonos when motion is detected, I'm struggling to work out how to make it NOT fire if a particular contact sensor is 'open'.

I tried adding an IF but it has 'becomes open' not IS 'open'

Help appreciated:

Take the Front Gate Contact Sensor out of the Triggers and add a new Simple Condition as the first entry under actions

Simple Condition: Front Gate Sensor open -> Exit Rule

I am on my phone. I can create a screenshot in a little while for you if you need additional help.

EDIT: What was your thought around the "Delay 30 seconds" as the last action in your rule? This really does nothing and I think there is a misunderstanding. Let me know what you intended to do and I'll if I can help

Ok, here is mock-up for your rule:

I added the usage of the Private Boolean of the rule to debounce the sensor going active->inactive->active etc.

You have to add you "Sonos set track" and "Sonos play" actions

Here is a question, do you want to play the wav over and over again or only once?

Front gate contact is another trigger for the Sonos, it is if the gate gets opened at night.

The 30 seconds was to prevent the Sonos being told to restart the sound effect when it's playing (if motion triggers more than once), therefore making it sound like a sound effect rather than the real thing.

My contact sensor on our sliding door isn't yet in my rule but that is the one to prevent the Sonos being triggered. The logic is so that if during the night the dog is put out in the garden then if the door is open she won't trigger the Sonos.

Ok, the delay doesn't work that way. It only delays the actions following the delay. Not another execution of the rule. I solved that with the private boolean usage above.

The rule I posted still stands, just add you front gate contact sensor as a trigger again and select the contact you want to evaluate in the first line of my example

Thanks, will test...

Private boolean. Add to your conditional action that Private boolean must be true. And your very first action is to Set PB to false and your second action will be a delayed action setting PB to true again in whatever gap you want to impose on the action. So, with the sliding glass door...something like this:

Trigger: Gate opened

Action:
If Sliding Glass door closed and PB True:
Set PB false
Set PB true after delay of 30 seconds
Set volume
Play track
End-If