From 79bae15b22d2fc053ade877ab53775c167e0d2d8 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Sat, 20 Oct 2018 19:59:33 +0000 Subject: [PATCH] 74_XiaomiBTLESens: fix humidity Bug git-svn-id: https://svn.fhem.de/fhem/trunk@17579 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/74_XiaomiBTLESens.pm | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index a78c3a3f9..8407acd02 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: fix humidity bug - feature: 49_SSCam: direct help for attributes, new get versionNotes command - change: ROOMMATE, GUEST: Support for updated GEOFANCY version - feature: 98_GEOFANCY: add new reading LocTravDist; add support for diff --git a/fhem/FHEM/74_XiaomiBTLESens.pm b/fhem/FHEM/74_XiaomiBTLESens.pm index d5fcbd322..cd6711cc2 100644 --- a/fhem/FHEM/74_XiaomiBTLESens.pm +++ b/fhem/FHEM/74_XiaomiBTLESens.pm @@ -35,7 +35,7 @@ package main; use strict; use warnings; -my $version = "2.4.0"; +my $version = "2.4.2"; sub XiaomiBTLESens_Initialize($) { @@ -100,7 +100,7 @@ BEGIN { modules Log3 CommandAttr - attr +# attr AttrVal ReadingsVal IsDisabled @@ -886,14 +886,13 @@ sub ThermoHygroSensHandle0x10($$) { my @numberOfHex = split( ' ', $notification ); $notification =~ s/\s+//g; - $readings{'temperature'} = pack( 'H*', substr( $notification, 4, 8 ) ); if ( scalar(@numberOfHex) < 14 ) { - $readings{'humidity'} = pack( 'H*', substr( $notification, 16, 8 ) ); + $readings{'humidity'} = pack( 'H*', substr( $notification, 18, 8 ) ); } else { - $readings{'humidity'} = pack( 'H*', substr( $notification, 18, 8 ) ); + $readings{'humidity'} = pack( 'H*', substr( $notification, 16, 8 ) ); } $hash->{helper}{CallBattery} = 0;