From edee57e188f9281e196aa9b83f678e95249f1850 Mon Sep 17 00:00:00 2001
From: Marko Oldenburg <leongaultier@gmail.com>
Date: Mon, 5 Feb 2018 11:18:39 +0100
Subject: [PATCH] RexExp

---
 74_XiaomiBTLESens.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/74_XiaomiBTLESens.pm b/74_XiaomiBTLESens.pm
index 6b880ea..b9a913a 100644
--- a/74_XiaomiBTLESens.pm
+++ b/74_XiaomiBTLESens.pm
@@ -479,7 +479,8 @@ sub XiaomiBTLESens_ExecGatttool_Run($) {
             Log3 $name, 5, "XiaomiBTLESens ($name) - ExecGatttool_Run: gatttool loop result ".join(",", @gtResult);
             $loop++;
             
-            $gtResult[1] = split("\n",$gtResult[1]) if( AttrVal($name,"model","none") eq 'thermoHygroSens' and $gattCmd eq 'write' and $handle eq '0x10');
+            ($gtResult[1]) = split("\n",$gtResult[1]) if( AttrVal($name,"model","none") eq 'thermoHygroSens' and $gattCmd eq 'write' and $handle eq '0x10');
+            $gtResult[1] =~ s/\\n//g if( AttrVal($name,"model","none") eq 'thermoHygroSens' and $gattCmd eq 'write' and $handle eq '0x10');
             
             $gtResult[0] = 'connect error'
             unless( defined($gtResult[0]) );