How to poll the value of a vitual pin

We call this feature “Hardware state handling”. You can vote for it here. At the moment it is not implemented, but we are very close to it.