I solved, but I´m not proud about the solution, I think it will be another one better than this.
I used the replace function to change the "," by "." and put the value inside =() like a formula or variable and with this is working. But this only will work with "spanish format"
this is the line:
- qlik.currApp().variable.setStringValue($scope.layout.props.varName, '=(' + $scope.layout.props.varValue.replace(",", ".") + ')');