Commit 1d5d96a1 authored by Cédric Crettaz's avatar Cédric Crettaz 🖥
Browse files

Update app.py with the true free/total chlorine.

parent d43035d5
......@@ -369,8 +369,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[3] / 100 if values[3] else None, # in mg/L
totalChlorine=values[2] / 100 if values[2] else None, # in mg/L
freeChlorine=values[2] / 100 if values[2] else None, # in mg/L
totalChlorine=values[3] / 100 if values[3] else None, # in mg/L
redox=values[4] / 1000 if values[4] else None, # in volts
dateObserved=timestamp,
meta_datetime=timestamp,
......@@ -440,8 +440,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[3] / 100 if values[3] else None, # in mg/L
totalChlorine=values[2] / 100 if values[2] else None, # in mg/L
freeChlorine=values[2] / 100 if values[2] else None, # in mg/L
totalChlorine=values[3] / 100 if values[3] 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'],
......
Supports Markdown
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