Commit 027f4fc3 authored by Cédric Crettaz's avatar Cédric Crettaz 🖥

Update app.py for Carouge fountain.

parent bbb3f4c9
......@@ -339,7 +339,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 = (65536 - values[0]) / 10,
dateObserved=timestamp,
)
......@@ -405,7 +405,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 = (65536 - 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