diff --git a/wled b/wled index 59cbec4..7e1bf1b 100755 --- a/wled +++ b/wled @@ -59,7 +59,7 @@ case "$2" in api_resp=$(curl_cmd --json "{'bri':$bright}" "http://$wled_host/json") ;; [1-9]|1[0-7]) # Switch to preset. - api_resp=$(curl_cmd --json "{'on':true,'ps':$2}" "http://$wled_host/json") + api_resp=$(curl_cmd --json "{'ps':$2}" "http://$wled_host/json") ;; l|list) # List presets. echo "Presets on $wled_host:" @@ -86,6 +86,7 @@ case "$2" in ;; esac +# Check curl exit status curl_exit=$? if test $curl_exit -ne 0; then echo "Error: curl exited with exit code $curl_exit." >&2