Commit 5a11e5f4 authored by Cédric Crettaz's avatar Cédric Crettaz 🖥

Corrections for the chlorine.

parent 7bf8896e
......@@ -425,8 +425,8 @@ def _update_fountain_entity(sensor_dataFrame, timestamp):
entity = get_model_water_quality_observed(
pH=values[0] / 100 if values[0] else None, # in pH standard unit
temperature=values[1] / 10 if values[1] else None, # in grad C
freeChlorine=values[2] / 100 if values[2] else None, # in mg/L
totalChlorine=values[3] / 100 if values[3] else None, # in mg/L
freeChlorine=values[3] / 100 if values[3] else None, # in mg/L
totalChlorine=values[2] / 100 if values[2] else None, # in mg/L
redox=values[4] / 1000 if values[4] else None, # in volts
dateObserved=timestamp,
meta_datetime=timestamp,
......@@ -495,8 +495,8 @@ def _update_historical_db_from_local_raw_files():
entity = get_model_water_quality_observed(
pH=values[0] / 100 if values[0] else None, # in pH standard unit
temperature=values[1] / 10 if values[1] else None, # in grad C
freeChlorine=values[2] / 100 if values[2] else None, # in mg/L
totalChlorine=values[3] / 100 if values[3] else None, # in mg/L
freeChlorine=values[3] / 100 if values[3] else None, # in mg/L
totalChlorine=values[2] / 100 if values[2] else None, # in mg/L
redox=values[4] / 1000 if values[4] else None, # in volts
dateObserved=json_data['metadata']['time'],
meta_datetime=json_data['metadata']['time'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment