Leserlicher Name in die csv geschrieben
authorChrisu Jähnl <chrisu@skorzak.priv.at>
Thu, 10 May 2018 21:25:31 +0000 (21:25 +0000)
committerChrisu Jähnl <chrisu@skorzak.priv.at>
Thu, 10 May 2018 21:25:31 +0000 (21:25 +0000)
seewasser.py

index 40d2455dc0da2bfcef63d410fba0fe3f04954672..dfed1cfa06e6fa6379045aa8fe0d9e4758936456 100755 (executable)
@@ -56,7 +56,7 @@ def writesensordatacsv(config, sensor_id, sensor_name, timestamp, value_type, va
     # Schreiben des csv-files
     file = open(config.get("csv", "filename"), "a", newline = "")
     writer = csv.writer(file, dialect = "excel")
-    writer.writerow([timestamp.strftime("%Y-%m-%d %H:%M"), sensor_id, "{:.1f}".format(value)])
+    writer.writerow([timestamp.strftime("%Y-%m-%d %H:%M"), sensor_id, sensor_name, "{:.1f}".format(value)])
 
     file.close()