Correct Qconso

This commit is contained in:
Etienne Chassaing 2025-08-20 14:29:50 +02:00
parent f9422fd210
commit 25b3a114bf

View File

@ -110,7 +110,7 @@ def format_PU_data(data):
def format_DS_data(data): def format_DS_data(data):
return { return {
"timestamp": datetime.datetime.now().isoformat(), "timestamp": datetime.datetime.now().isoformat(),
"Qconso": np.round(data.get("Qdrain_sp", 0.0), 1), "Qconso": np.round(data.get("Inlet_flow", 0.0), 1) - np.round(data.get("Outlet_flow", 0.0), 1),
"TankLevel": np.round(data.get("TankLevel", 0.0), 2), "TankLevel": np.round(data.get("TankLevel", 0.0), 2),
"Qinlet": np.round(data.get("Inlet_flow", 0.0), 1), "Qinlet": np.round(data.get("Inlet_flow", 0.0), 1),
"Qoutlet": np.round(data.get("Outlet_flow", 0.0), 1), "Qoutlet": np.round(data.get("Outlet_flow", 0.0), 1),