From da13c447009b74807bdb411816bf23fda94bd5ac Mon Sep 17 00:00:00 2001 From: Robert Borzutzki Date: Wed, 19 Oct 2022 17:35:43 +0200 Subject: [PATCH] fix --- examples/mqtt.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/mqtt.py b/examples/mqtt.py index 1e44ebf..433a44a 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -95,19 +95,19 @@ def on_connect(client, userdata, flags, rc): def on_message(client, userdata, msg): if msg.topic == "openWB/pv/W": - value_pvProduction = msg.payload.decode() + value_pvProduction = ""+msg.payload.decode() line = 0 elif msg.topic == "openWB/global/WHouseConsumption": - value_wHouseConsumption = msg.payload.decode() + value_wHouseConsumption = ""+msg.payload.decode() line = 15 elif msg.topic == "openWB/evu/W": - value_energyImportExport = msg.payload.decode() + value_energyImportExport = ""+msg.payload.decode() line = 30 elif msg.topic == "openWB/housebattery/%Soc": - topic_houseBatterySoC = msg.payload.decode() + topic_houseBatterySoC = ""+msg.payload.decode() line = 45 elif msg.topic == "openWB/housebattery/W": - topic_houseBatteryLoadUnload = msg.payload.decode() + topic_houseBatteryLoadUnload = ""+msg.payload.decode() line = 60 print(line)