The first thing I see is that you appear to have the assignment back to front. The target variable should be on the left of the assignment. As an example you would never do
12.5 = windspeed;
would you ?
The second problem is that you have declared windspeed as a float but you are trying to assign a substring of a String to it and the data types are different
So, what to do ?
Although it looks very clever to do everything in a single statement I suggest that you break down the conversion so that you can test each stage
use substring() to extract the value as a new String
print the new String to verify that it is correct
use toFloat() to convert the new String to a float and assign it to a variable
variabletype String the type with a capital "S" String is dangerous to use if you don't know the limits.
Variable-type String can eat up all memory and then causes very hard to find program-crashes.
You should use array of char or the library SafeString which could be installed with the library-manager in the Arduino-IDE.
for assigning a value to a variable it has to have this pattern
the variabe is on the left side
myVariable = value
myVariable = expression
the type of the value / expression must be of the same type as the variable
int myInteger;
myIntegerVar = 1.23; // does not work. Assigning a float-value to an integer means different types
float myFloatVar;
myFloatVar = "A character-sequence"; // does not work. different types
of course there are functions to convert values from almost any type to almost any other type
Depending on what you want to do with the strored value in the variable different variabletype would be sufficient.
For Just quoting the value "1.54" a string would be sufficient
If you want to do real calculations you must do a typecasting
"classical" but dangerous type String:
@the C++-purists: If you have a different opinon post a full blown tutorial about how to use c_str and arrays of char
SafeString offers assigning all kinds of values straight-forward without typecasting to variables of type SafeString
#include <SafeString.h>
createSafeString(myDemoStr, 20); // a SafeString object for 20 characters
myDemoStr = 1.54; // assign a float-value DIRECTLY to a SafeString
//and offers functions for typecasting
float myFloatVar;
// here the target-variable must be used as a parameter = inside parenthesis ()
myDemoStr.toFloat(myFloatVar);
the name is program: SafeStrings are safe to use.
best regards Stefan