2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

74_XiaomiBTLESens : fix humidity code

git-svn-id: https://svn.fhem.de/fhem/trunk@17620 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2018-10-26 06:49:03 +00:00
parent 37df9c8f65
commit 0414946713
2 changed files with 4 additions and 9 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 code
- feature: 98_Verkehrsinfo.pm: add attribut disable
- feature: allowed: multi-allowed changes (Forum #92423)
- feature: 93_DbRep: V8.4.0, reduceLog from DbLog integrated into DbRep,

View File

@ -35,7 +35,7 @@ package main;
use strict;
use warnings;
my $version = "2.4.3";
my $version = "2.4.4";
sub XiaomiBTLESens_Initialize($) {
@ -860,7 +860,7 @@ sub ThermoHygroSensHandle0x18($$) {
Log3 $name, 4, "XiaomiBTLESens ($name) - Thermo/Hygro Sens Handle0x18";
chomp($notification);
$notification =~ s/ //g;
$notification =~ s/\s+//g;
### neue Vereinheitlichung für Batteriereadings Forum #800017
$readings{'batteryPercent'} = hex( "0x" . $notification );
@ -888,13 +888,7 @@ sub ThermoHygroSensHandle0x10($$) {
$notification =~ s/\s+//g;
$readings{'temperature'} = pack( 'H*', substr( $notification, 4, 8 ) );
if ( scalar(@numberOfHex) < 14 ) {
$readings{'humidity'} = pack( 'H*', substr( $notification, 18, 8 ) );
}
else {
$readings{'humidity'} = pack( 'H*', substr( $notification, 16, 8 ) );
}
$readings{'humidity'} = pack( 'H*', substr( $notification, 18, 8 ) );
$hash->{helper}{CallBattery} = 0;
return \%readings;