From 104a56f52f18de443cc09366b0fd0bc00812468f Mon Sep 17 00:00:00 2001 From: Robert Borzutzki Date: Wed, 19 Oct 2022 21:11:16 +0200 Subject: [PATCH] int to str for display --- examples/mqtt.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/mqtt.py b/examples/mqtt.py index 0e60af8..5e34e05 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -131,18 +131,18 @@ try: logging.info("SoC: "+str(value_houseBatterySoC)) logging.info("Bio: "+str(value_houseBatteryLoadUnload)) #drawblack.rectangle((150, 0, 220, 50), fill = 255) - drawblack.text((150, 0), value_pvProduction, font = font10, fill = 0) + drawblack.text((150, 0), str(value_pvProduction), font = font10, fill = 0) #drawblack.rectangle((150, 15, 220, 50), fill = 255) - drawblack.text((150, 15), value_wHouseConsumption, font = font10, fill = 0) + drawblack.text((150, 15), str(value_wHouseConsumption), font = font10, fill = 0) #drawblack.rectangle((150, 30, 220, 50), fill = 255) if value_energyImportExport > 0: - drawred.text((150, 30), value_energyImportExport, font = font10, fill = 0) + drawred.text((150, 30), str(value_energyImportExport), font = font10, fill = 0) else: - drawblack.text((150, 30), value_energyImportExport, font = font10, fill = 0) + drawblack.text((150, 30), str(value_energyImportExport), font = font10, fill = 0) #drawblack.rectangle((150, 45, 220, 50), fill = 255) - drawblack.text((150, 45), value_houseBatterySoC, font = font10, fill = 0) + drawblack.text((150, 45), str(value_houseBatterySoC), font = font10, fill = 0) #drawblack.rectangle((150, 60, 220, 50), fill = 255) - drawblack.text((150, 60), value_houseBatteryLoadUnload, font = font10, fill = 0) + drawblack.text((150, 60), str(value_houseBatteryLoadUnload), font = font10, fill = 0) epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRedimage))