From 36dec5bb4461c34d3b8aeec727424a70e34acdf4 Mon Sep 17 00:00:00 2001 From: Robert Borzutzki Date: Wed, 19 Oct 2022 17:54:40 +0200 Subject: [PATCH] fix --- examples/mqtt.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/mqtt.py b/examples/mqtt.py index b059806..a5c0442 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -117,8 +117,6 @@ def on_message(client, userdata, msg): line = 60 print(line) - if value_pvProduction == "": - value_pvProduction = "" print(value_pvProduction) print(value_wHouseConsumption) print(value_energyImportExport) @@ -131,6 +129,12 @@ client = mqtt_client.Client(client_id, protocol=paho.MQTTv31) client.username_pw_set(username, password=pw) client.on_connect = on_connect +value_pvProduction = "" +value_wHouseConsumption = "" +value_energyImportExport = "" +topic_houseBatterySoC = "" +topic_houseBatteryLoadUnload = "" + client.on_message = on_message client.connect(broker, port=port)