1f94b1133SShawn McCarney# set_device
2f94b1133SShawn McCarney
3f94b1133SShawn McCarney## Description
4f94b1133SShawn McCarneySets the hardware device that will be used by subsequent actions.
5f94b1133SShawn McCarney
6f94b1133SShawn McCarneyMany actions read from or write to a device.  Initially this is the
7f94b1133SShawn McCarney[device](device.md) that contains the regulator operation being performed, such
8f94b1133SShawn McCarneyas [configuration](configuration.md) or
9f94b1133SShawn McCarney[sensor_monitoring](sensor_monitoring.md).
10f94b1133SShawn McCarney
11f94b1133SShawn McCarneyUse "set_device" if you need to change the hardware device used by actions.
12*7e2a549eSShawn McCarneyFor example, you need to check a bit in two different I/O expanders to detect a
13*7e2a549eSShawn McCarneyphase fault.
14f94b1133SShawn McCarney
15f94b1133SShawn McCarney## Property Value
16f94b1133SShawn McCarneyString containing the unique ID of the [device](device.md).
17f94b1133SShawn McCarney
18f94b1133SShawn McCarney## Return Value
19f94b1133SShawn McCarneytrue
20f94b1133SShawn McCarney
21f94b1133SShawn McCarney## Example
22f94b1133SShawn McCarney```
23f94b1133SShawn McCarney{
24f94b1133SShawn McCarney  "set_device": "io_expander2"
25f94b1133SShawn McCarney}
26f94b1133SShawn McCarney```
27