From 240cb2f569d8d6eaef5e9b1ed0125f740326979f Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 20 Aug 2019 15:12:37 +0200 Subject: [PATCH] Fix hp p2000 sensor empty value --- storage/hp/p2000/xmlapi/mode/components/sensor.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/hp/p2000/xmlapi/mode/components/sensor.pm b/storage/hp/p2000/xmlapi/mode/components/sensor.pm index 082f74365..b180d8ac9 100644 --- a/storage/hp/p2000/xmlapi/mode/components/sensor.pm +++ b/storage/hp/p2000/xmlapi/mode/components/sensor.pm @@ -62,7 +62,7 @@ sub check { # Warning # foreach my $sensor_id (keys %$results) { - my ($value, $unit) = ('', '');; + my ($value, $unit) = (undef, '');; ($value, $unit) = ($1, $2) if ($results->{$sensor_id}->{value} =~ /\s*([0-9\.,]+)\s*(\S*)\s*/); if (defined($results->{$sensor_id}->{'sensor-type'}) && defined($sensor_type{$results->{$sensor_id}->{'sensor-type'}})) { $unit = $sensor_type{$results->{$sensor_id}->{'sensor-type'}}->{unit};