From 66ef3f424f35ac73bf5f79f2e6f47ed5f440b83f Mon Sep 17 00:00:00 2001 From: Robert Borzutzki Date: Thu, 20 Oct 2022 09:15:31 +0200 Subject: [PATCH] negative to positive --- examples/mqtt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/mqtt.py b/examples/mqtt.py index f01c1e0..cc3b77b 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -65,6 +65,7 @@ def on_message(client, userdata, msg): if msg.topic == "openWB/pv/W": value_pvProduction = int(msg.payload.decode()) + value_pvProduction = -value_pvProduction elif msg.topic == "openWB/global/WHouseConsumption": value_wHouseConsumption = int(msg.payload.decode()) elif msg.topic == "openWB/evu/W": @@ -125,7 +126,7 @@ try: drawred.text((5, 60), 'Batterie Entladen', font = font10, fill = 0) logging.info("-----") - logging.info("PvPord: "+str(-value_pvProduction)) + logging.info("PvProd: "+str(value_pvProduction)) logging.info("HouseU: "+str(value_wHouseConsumption)) logging.info("EneI/E: "+str(value_energyImportExport)) logging.info("BatSoC: "+str(value_houseBatterySoC))