From 7d89d30be24bd672c7bb62cc10ab6b63ad1c6e9a Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Mon, 19 Mar 2018 12:57:53 +0000 Subject: [PATCH] 74_XiaomiBTLESens: Backslash found where operator expected git-svn-id: https://svn.fhem.de/fhem/trunk@16444 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/74_XiaomiBTLESens.pm | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index fa94f2e0f..3946abbec 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 74_XiaomiBTLESens: Backslash found where operator expected - bugfix: 98_TRAFFIC: v1.3.7, fixed special characters and updateschedule - change: 10_OWServer: autoselecting OWNet module - bugfix: 72_FB_CALLLIST: allow newlines in mapping attributes values diff --git a/fhem/FHEM/74_XiaomiBTLESens.pm b/fhem/FHEM/74_XiaomiBTLESens.pm index 6d5e37839..8e03b74b1 100644 --- a/fhem/FHEM/74_XiaomiBTLESens.pm +++ b/fhem/FHEM/74_XiaomiBTLESens.pm @@ -50,7 +50,7 @@ eval "use Blocking;1" or $missingModul .= "Blocking "; #use Data::Dumper; only for Debugging -my $version = "2.0.10"; +my $version = "2.0.11"; @@ -655,7 +655,7 @@ sub XiaomiBTLESens_FlowerSensHandle0x38($$) { my @dataBatFw = split(" ",$notification); $readings{'batteryLevel'} = hex("0x".$dataBatFw[0]); - $readings{'battery'} = (hex("0x".$dataBatFw[0]) > 19 ? "ok" : "low"); + $readings{'battery'} = (hex("0x".$dataBatFw[0]) > 15 ? "ok" : "low"); $readings{'firmware'} = ($dataBatFw[2]-30).".".($dataBatFw[4]-30).".".($dataBatFw[6]-30); $hash->{helper}{CallBattery} = 1; @@ -848,8 +848,8 @@ sub XiaomiBTLESens_encodeJSON($) { my %response = ( 'gtResult' => $gtResult ); - - return encode_json \%response; + + return encode_json(\%response); } ## Routinen damit Firmware und Batterie nur alle X male statt immer aufgerufen wird