Fixed history

This commit is contained in:
Maximilian Giller 2023-10-25 17:48:21 +02:00
parent 74e094e0cf
commit b0841841b1

View file

@ -6,8 +6,4 @@ def get_recent_entries(path: str, count: int) -> list[dict]:
with open(path, "r") as f:
reader = csv.DictReader(f)
entries = list(reader)
entries = [
{"timestamp": entry[0], "temperature": entry[1], "humidity": entry[2]}
for entry in entries
]
return entries[-count:]