I am trying to change a setting in WLED via the WLED api through the home assistant UI by means of a slider. The slider value shall be passed via a HTTP post request (with the HA REST API) enabling seamless update of some WLED settings (that are part of a usermod, so not integrated in the HA WLED integration).
For this I’ve created two sliders and REST configuration as follows:
When I call the rest_command.staircase_animate service in the developer tools service and input, for example the following:
{
"wipe_speed":"150",
"aan_tijd":"10"
}
This direct command works well.
I seem however not to be able to get the slider values to be passed to the REST api and then call the rest_command manually, enabling the updated slider values to be sent to WLED.
The automation is the next step when the input slider state changes, indeed. Currently I call the update towards WLED via the “uitvoeren” (apply) button as you see in the image above.
I did add the “input_number” already in earlier attempts to couple the input number variable into the REST command, but in a different way and without success. Now I’ve tried your approaches, but both do not bring any result. It now looks like:
@Burningstone I’ve been humbling around a bit; I found out that I cannot enter the value from the input slider straight away into the rest command as defined in configuration yaml, so you are absolutely right; The rest API is now executed via an automation.
This is how it now works, hopefully an example that others can benefit from: