From ee3533c35356ade33bac036d776fad0f13953307 Mon Sep 17 00:00:00 2001 From: Thilo Krumrey Date: Thu, 11 Jul 2024 13:05:44 +0200 Subject: [PATCH] Change format to fixed amount of significant digits. --- devices/ControlByWeb_X-317.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices/ControlByWeb_X-317.py b/devices/ControlByWeb_X-317.py index 118146e..563d3cd 100644 --- a/devices/ControlByWeb_X-317.py +++ b/devices/ControlByWeb_X-317.py @@ -68,7 +68,8 @@ def set_heater_voltage(self,voltage): 4 : "/state.xml?an4State=", 5 : "/state.xml?an5State=", } - req = self._http_request(sv_reqests[self.channel]+str(voltage)) + formatted_voltage = "{:.5f}".format(voltage) + req = self._http_request(sv_reqests[self.channel]+formatted_voltage) return self._read_request(req)