diff --git a/wled b/wled index 71d3343..9752a5e 100755 --- a/wled +++ b/wled @@ -38,10 +38,9 @@ curl_cmd() { active_preset() { # Find number of active preset. API returns -1 if none is active, we return # an empty string. - preset="$(curl_cmd "http://$1/json" | \ + curl_cmd "http://$1/json" | \ # -1 will be a no-match. - sed -n 's/.*"ps"[[:space:]]*:[[:space:]]*\(1\?[0-9]\).*/\1/p')" - printf '%u' "$preset" + sed -n 's/.*"ps"[[:space:]]*:[[:space:]]*\(1\?[0-9]\).*/\1/p' } # Parse host argument.