Activate or deactivate a node according the state of a switch

I think Marco was asking how to change a dashboard switch to a disabled/inactive state.

I cannot help with this myself unfortunately as I've yet to use Dashboard at all...