Skip to content

Commit

Permalink
Merge pull request #194 from nils-s/fix/batch-local-readings
Browse files Browse the repository at this point in the history
Batch local readings by day
  • Loading branch information
Gadgetoid authored Apr 24, 2024
2 parents 2e48ca1 + e3a7053 commit 17232ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enviro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def get_sensor_readings():
def save_reading(readings):
# open todays reading file and save readings
helpers.mkdir_safe("readings")
readings_filename = f"readings/{helpers.datetime_file_string()}.txt"
readings_filename = f"readings/{helpers.date_string()}.txt"
new_file = not helpers.file_exists(readings_filename)
with open(readings_filename, "a") as f:
if new_file:
Expand Down

0 comments on commit 17232ce

Please sign in to comment.