2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

74_XiaomiBTLESens: fix humidity Bug

git-svn-id: https://svn.fhem.de/fhem/trunk@17579 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2018-10-20 19:59:33 +00:00
parent 0fb42d6080
commit 79bae15b22
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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;