I have three shell scripts where I want to post a variable to the script.
device_power: >
curl --location --globoff --request PUT "http://{{ipAddress}}/api/v1/{{authToken}}/state" \
--data '{"on": {"value": true}}'
device_brightness: >
curl --location --globoff --request PUT "http://{{ipAddress}}/api/v1/{{authToken}}/state" \
--data '{"brightness" : {"value":100, "duration":30}}'
device_scene: >
curl --location --globoff --request PUT "http://{{ipAddress}}/api/v1/{{authToken}}/effects" \
--data '{"select" : “Scene1”}’
For device_power this is ‘true’ or ‘false’, switching the device on/off, for device_brightness, this is a numeric value between 0 and 100, and for device_scene, this is a scene name.
How do I have to change the shell script so it can accept a variable and how do I post these variable is a yaml script