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)