Commit ea38d9f9 authored by Cédric Crettaz's avatar Cédric Crettaz 🖥

Update app.py for the turbidity.

parent 6c779c20
......@@ -338,8 +338,7 @@ def _update_fountain_entity(sensor_dataFrame, timestamp):
if len(values) == 1: # this is LoRa Device w/ the turbidity sensor
entity = get_model_water_quality_observed(
#turbidity=values[0],
turbidity = (65536 - values[0]) / 10,
turbidity=values[0] / 10,
dateObserved=timestamp,
)
......@@ -404,8 +403,7 @@ def _update_historical_db_from_local_raw_files():
if len(values) == 1: # this is LoRa Device w/ the turbidity sensor
entity = get_model_water_quality_observed(
#turbidity=values[0],
turbidity = (65536 - values[0]) / 10,
turbidity=values[0] / 10,
dateObserved=json_data['metadata']['time'],
meta_datetime=json_data['metadata']['time'], # only needed for historical data collected offline
)
......
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