From 7a6a4fe7961f7a69e5b837210962dfe77d08bf46 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Wed, 8 Feb 2017 20:40:36 +0100 Subject: [PATCH] fix Error handling --- 74_XiaomiFlowerSens.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/74_XiaomiFlowerSens.pm b/74_XiaomiFlowerSens.pm index 5eca87d..9d9b7e6 100644 --- a/74_XiaomiFlowerSens.pm +++ b/74_XiaomiFlowerSens.pm @@ -35,7 +35,7 @@ use POSIX; use JSON; use Blocking; -my $version = "0.6.4"; +my $version = "0.6.5"; @@ -386,7 +386,7 @@ sub XiaomiFlowerSens_callGatttool($@) { Log3 $name, 4, "Sub XiaomiFlowerSens_callGatttool ($name) - processing gatttool response. sensData: $readSensData[1]"; return ($readSensData[1],undef) - unless( $readSensData[0] =~ /Characteristic value/ ); + unless( $readSensData[0] !=~ /Characteristic value/ ); ### Read Firmware and Battery Data @@ -402,7 +402,7 @@ sub XiaomiFlowerSens_callGatttool($@) { Log3 $name, 4, "Sub XiaomiFlowerSens_callGatttool ($name) - processing gatttool response. batFwData: $readBatFwData[1]"; return ($readBatFwData[1],undef) - unless( $readBatFwData[0] =~ /Characteristic value/ ); + unless( $readBatFwData[0] !=~ /Characteristic value/ );