Fixes rate calculation in sensor

Rate wasn't a float, yielding 0 for values != 1