2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00

correct batterystate for 3-state at trigger event

git-svn-id: https://svn.fhem.de/fhem/trunk@5846 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-05-13 17:03:45 +00:00
parent 324a1df4ef
commit ad50d1059b

View File

@ -1781,10 +1781,11 @@ sub CUL_HM_Parse($$) {#########################################################
}
elsif($mTp eq "41"){
($chn,$cnt,$state)=(hex($1),$2,$3) if($p =~ m/^(..)(..)(..)/);
$chn = sprintf("%02X",$chn&0x3f);
my $err = $chn & 0x80;
$chn = sprintf("%02X",$chn & 0x3f);
$shash = $modules{CUL_HM}{defptr}{"$src$chn"}
if($modules{CUL_HM}{defptr}{"$src$chn"});
push @evtEt,[$shash,1,"battery:". ((hex($mI[1])&0x80)?"low" :"ok" )];
push @evtEt,[$shash,1,"battery:". ($err?"low" :"ok" )];
}
if (defined($state)){# if state was detected post events
my $txt;