@@ -61,6 +61,7 @@ def __init__(self, adapter, _id, station_id, unit):
6161 'title' : 'Low Tide Level' ,
6262 'type' : 'number' ,
6363 'unit' : 'foot' if self .unit == 'english' else 'meter' ,
64+ 'multipleOf' : 0.1 ,
6465 'readOnly' : True ,
6566 },
6667 0
@@ -95,6 +96,7 @@ def __init__(self, adapter, _id, station_id, unit):
9596 'title' : 'High Tide Level' ,
9697 'type' : 'number' ,
9798 'unit' : 'foot' if self .unit == 'english' else 'meter' ,
99+ 'multipleOf' : 0.1 ,
98100 'readOnly' : True ,
99101 },
100102 0
@@ -121,6 +123,7 @@ def __init__(self, adapter, _id, station_id, unit):
121123 '@type' : 'LevelProperty' ,
122124 'type' : 'number' ,
123125 'unit' : 'foot' if self .unit == 'english' else 'meter' ,
126+ 'multipleOf' : 0.1 ,
124127 'readOnly' : True ,
125128 },
126129 0
@@ -234,7 +237,7 @@ def poll(self):
234237 set_high = True
235238
236239 self .properties ['highTideLevel' ].update (
237- float (prediction ['v' ])
240+ round ( float (prediction ['v' ]), 1 )
238241 )
239242 self .properties ['highTideTime' ].update (
240243 prediction ['t' ].split (' ' )[1 ]
@@ -244,7 +247,7 @@ def poll(self):
244247 set_low = True
245248
246249 self .properties ['lowTideLevel' ].update (
247- float (prediction ['v' ])
250+ round ( float (prediction ['v' ]), 1 )
248251 )
249252 self .properties ['lowTideTime' ].update (
250253 prediction ['t' ].split (' ' )[1 ]
@@ -279,7 +282,7 @@ def poll(self):
279282 .format (self .station_id ))
280283 else :
281284 self .properties ['currentLevel' ].update (
282- float (level ['v' ])
285+ round ( float (level ['v' ]), 1 )
283286 )
284287
285288 time .sleep (_POLL_INTERVAL )
0 commit comments