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