By using the button’s On status to trigger a timeout timer that runs for 30 minutes, then writes an Off value to the widget’s virtual pin.
You might want to read these…
Pete.