bettwaage-sidequest #2

Merged
m.giller merged 38 commits from bettwaage-sidequest into master 2024-06-07 23:38:56 +02:00
Showing only changes of commit 9a9d40db82 - Show all commits

View file

@ -8,7 +8,7 @@ import requests as r
from ..hue import hue from ..hue import hue
file_path: str = "bettwaage.csv" file_path: str = "bettwaage.csv"
header: str = "timestamp;tl;tr;bl;br;total;" header: str = "timestamp;tl;tr;bl;br;total;\n"
bett_ip: str = "http://192.168.178.110:80" bett_ip: str = "http://192.168.178.110:80"
matrix_clock_api: str = "http://192.168.178.84:8000" matrix_clock_api: str = "http://192.168.178.84:8000"
@ -113,9 +113,10 @@ def check_for_change():
def add_line_to_bed_history(line: str) -> None: def add_line_to_bed_history(line: str) -> None:
if not os.path.exists(file_path): exists = os.path.exists(file_path)
add_line_to_bed_history(header)
with open(file_path, "a") as fp: with open(file_path, "a") as fp:
if not exists:
fp.write(header)
fp.write(line + "\n") fp.write(line + "\n")