State-patching functionality patch-state/1