diff --git a/__pycache__/api_call.cpython-314.pyc b/__pycache__/api_call.cpython-314.pyc new file mode 100644 index 0000000..eaaff9f Binary files /dev/null and b/__pycache__/api_call.cpython-314.pyc differ diff --git a/__pycache__/api_prometheus.cpython-314.pyc b/__pycache__/api_prometheus.cpython-314.pyc new file mode 100644 index 0000000..ae0f868 Binary files /dev/null and b/__pycache__/api_prometheus.cpython-314.pyc differ diff --git a/__pycache__/datum_umrechnen.cpython-314.pyc b/__pycache__/datum_umrechnen.cpython-314.pyc new file mode 100644 index 0000000..6662dd6 Binary files /dev/null and b/__pycache__/datum_umrechnen.cpython-314.pyc differ diff --git a/ladeprotokoll.py b/ladeprotokoll.py index b8fee27..97bda8d 100644 --- a/ladeprotokoll.py +++ b/ladeprotokoll.py @@ -84,9 +84,15 @@ for zeile in inhalt: continue print(" ") + +# Fusszeile mit Gesamtkosten und Gesamtverbrauch print('Kosten Gesamt: ', kosten_gesamt) strkostenkwh = str(kosten_pro_kwh) print("Kosten pro kWh: " + strkostenkwh + " €") verbrauch_gesamt = str(verbrauch_gesamt) -print("Verbrauch Gesamt: " + verbrauch_gesamt) +try: + formatted = "{:.3f}".format(float(verbrauch_gesamt)).replace('.', ',') +except: + formatted = verbrauch_gesamt +print("Verbrauch Gesamt: " + formatted)