I've got a situation where I have several z-wave locks in 3 different buildings.
I don't need an unlock case and in most cases I want to lock them all each evening.
Occasionally I want to be able to set a condition where 2 of them don't lock.
I initially thought I could use a virtual switch to control that occasion and I've played around with the rule machine but I haven't figured it out yet.
A virtual switch could work, but you could also use a hub variable or anything you have a way of testing in a condition. If you tried something that didn't work, it would be good to share a screenshot of the rule (or a copy/paste of the text) so someone can take a look.
In general, besides whatever trigger event(s) you want, you might want something like this for the actions:
IF (Virtual Switch is on) THEN
Lock: A, B,C
ELSE
Lock: A
END-IF
(where A, B, and C are your lock devices)
A common mistake in Rule Machine is to create a condition but not use it anywhere, but that's just me guessing what may have gone wrong before without more information to go by.
As @bertabcd1234 notes, a virtual switch or hub variable are both good.
I use virtual switches, and set them up in Google Home (or Alexa) to turn it the virtual switch on or off via voice, as well as controlling the virtual switch via a button or light-switch w/button capability, or contact sensor.
You will need to manage the on/off state of that virtual switch...if you leave it on or off unitentionally you'll get undesired results. You could have an automation that resets the virtual switch to off each morning to ensure you start each day in a "neutral" state.