ha-location-exporter/lib/strings.py

4 lines
104 B
Python

def mysql_trim_float(f):
s = str(f)
return float(s.split('.')[0] + '.' + s.split('.')[-1][:14])