--- title: "system.device.setDeviceEnabled" description: "Enables/disables a device in Ignition." --- # system.device.setDeviceEnabled > Enables/disables a device in Ignition. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions [Permission Type](projects\project-properties\project-properties.md#client---permissions): Device Management Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope. ## Syntax `system.device.setDeviceEnabled(deviceName, enabled)` ### Parameters | Type | Parameter | Description | |---|---|---| | String | `deviceName` | The name of the device in Ignition. | | Boolean | `enabled` | Whether to set the device as enabled or disabled. | ### Returns Nothing ### Scope All ## Code Examples ```python title="Example 1" # Example 1: Enable a device system.device.setDeviceEnabled("CLX", 1) ``` ```python title="Example 2" # Example 2: Disable a device system.device.setDeviceEnabled("CLX", 0) ```