Skip to content

Commit 8de87c5

Browse files
committed
use round instead of casting to int
1 parent 9236588 commit 8de87c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sensirion_uart_svm4x/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def set_temperature_offset_for_rht_measurements(self, t_offset):
432432
:param t_offset:
433433
Temperature offset as float in degrees celsius.
434434
"""
435-
t_offset_int = int((t_offset * 200) + 0.5)
435+
t_offset_int = round(t_offset * 200)
436436
self.svm4x.set_temperature_offset_for_rht_measurements(t_offset_int)
437437
return
438438

0 commit comments

Comments
 (0)