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))