Added setLogicalDeviceState function from donenik