From 9f3685349dbc4fe03f9d9504242fbb30947613fb Mon Sep 17 00:00:00 2001 From: David Blaik Date: Mon, 29 May 2023 14:20:31 +1000 Subject: [PATCH] Update EcowittExportCommand.php //replace uvi empty values with 0 --- app/Commands/EcowittExportCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Commands/EcowittExportCommand.php b/app/Commands/EcowittExportCommand.php index 609ffd0..2122106 100644 --- a/app/Commands/EcowittExportCommand.php +++ b/app/Commands/EcowittExportCommand.php @@ -124,6 +124,11 @@ class EcowittExportCommand extends Command // uv $this->debug('collecting: uv'); $uvi = $this->getData($ecowitt, 'list.so_uv.list.uv'); + + //replace empty values with 0 + foreach ($uvi as $key => $value) { + if(empty($value)) $uvi[$key] = "0"; + } // rainrate in mm/hr b $this->debug('collecting: rainrate in mm/hr b');