The thing about float(string) is that it's only returning 0 if the string is really "0". That way you can check if it's a number and not a name or so. May be it could also allow "0.0" (but then you complain about 0.0000 i guess
I can check the problem with sleep(). The thing is that waitfor() is working fine, so it might be a problem of the sleeping object not being active (some this.trigger("update",""); or so could fix it).