Commit fcc90ead authored by Kristian Tan's avatar Kristian Tan

d

parent fe751e6c
......@@ -57,6 +57,9 @@ def create_entry(change_pin):
# Formula to calculate kWh based on time and wattage
kwh = pins[change_pin]['Wattage'] * (elapsed / 3600) / 1000
print(pins[change_pin]['Wattage'])
print(elapsed)
print(kwh)
print("LATEST ENTRY: ")
print(latest_entry)
# If there is already an entry for today, update on time
......@@ -65,7 +68,6 @@ def create_entry(change_pin):
if latest_entry_date == start_date:
print("LATEST ENTRY DATE: ")
print(latest_entry_date)
print(kwh)
latest_entry.kwhUsed += kwh
else:
print("NEW")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment