diff --git a/src/specificClass.js b/src/specificClass.js index fa4ecdc..b537b20 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -21,7 +21,13 @@ class liquidFlowHandler { } updatePumpFlow() { - this.flow = this.pump.measurements.type("flow").variant("measured").position("downstream").getCurrentValue() || 0; + const measuredFlow = this.pump.measurements.type("flow").variant("measured").position("downstream").getCurrentValue(); + if (!measuredFlow) { + this.logger.warn(`Invalid flow value provided: ${measuredFlow}`); + this.flow = 0; + return; + } + this.flow = measuredFlow; } getOutput() {