wechselrichter zum tesent eingebunden
This commit is contained in:
@@ -18,7 +18,7 @@ class DataBaseCsv:
|
||||
writer.writerow(data)
|
||||
return
|
||||
|
||||
# If file exists → read existing header and data
|
||||
# If file exists → read existing header and modbus_registers
|
||||
with open(self.filename, mode='r', newline='') as csv_file:
|
||||
reader = csv.DictReader(csv_file)
|
||||
existing_fields = reader.fieldnames
|
||||
@@ -39,7 +39,7 @@ class DataBaseCsv:
|
||||
for row in existing_data:
|
||||
writer.writerow({field: row.get(field, '') for field in all_fields})
|
||||
|
||||
# Write new data row
|
||||
# Write new modbus_registers row
|
||||
writer.writerow({field: data.get(field, '') for field in all_fields})
|
||||
|
||||
# Replace original file with updated temporary file
|
||||
|
||||
Reference in New Issue
Block a user