If you are not a programmer and just want to point and click then virtual dummy switch should work.
The issue you are having with z-wave is the metadata timer is reset every time z-wave updates. To get around that problem you use a virtual switch which will not be affected by the z-wave updates.
You would need a rule to turn the virtual switch on when the z-wave was set to on.
The another rule to turn turn the z-wave off when the virtual switch was turned off.
The metadata timer is set in the virtual switch.
All of the above can be done without writing one line of code.
If you want to get into writing the code then go with the timer coding.
I just use expire metadata. Works fine and even works if OpenHab is rebooted.
The choice is yours.