type mismatch in config

This commit is contained in:
Wolfgang Hottgenroth 2021-08-24 10:06:13 +02:00
parent 220d1e0ef9
commit 3d97536b9b
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ def modbusStart(config, processImage):
def modbusHandler(config, processImage):
modbusClient = config["modbus"]["client"]
modbusRefreshPeriod = config["modbus"]["scanrate"]
modbusRefreshPeriod = float(config["modbus"]["scanrate"])
client = ModbusClient(modbusClient)

View File

@ -28,5 +28,5 @@ class MqttPeriodPublisher(AbstractMqttPublisher):
self.client.publish("{}/{}".format(self.config["analogInputPeriodicTopicPrefix"], str(analogInputItem[0])),
str(analogInputItem[1]))
sleep(self.config["analogInputPublishPeriod"])
sleep(float(self.config["analogInputPublishPeriod"]))