mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +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:
parent
324a1df4ef
commit
ad50d1059b
@ -1781,10 +1781,11 @@ sub CUL_HM_Parse($$) {#########################################################
|
|||||||
}
|
}
|
||||||
elsif($mTp eq "41"){
|
elsif($mTp eq "41"){
|
||||||
($chn,$cnt,$state)=(hex($1),$2,$3) if($p =~ m/^(..)(..)(..)/);
|
($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"}
|
$shash = $modules{CUL_HM}{defptr}{"$src$chn"}
|
||||||
if($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
|
if (defined($state)){# if state was detected post events
|
||||||
my $txt;
|
my $txt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user