Commit 6fc0f7b8 authored by alain's avatar alain 🐙
Browse files

account for calibrated data being NULL/0

parent d58c8835
......@@ -73,7 +73,7 @@ export default {
status: null
}
if(sensorData) {
if(sensorData && sensorData[`${parameter}_mean`] !== 0) {
const dataAgeInHours = ((new Date() - new Date(sensorData.time)) / 3600000) - 1
if(dataAgeInHours >= 48 || dataAgeInHours < 0) {
......
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