2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

CUL_HM:actiondetector correction

git-svn-id: https://svn.fhem.de/fhem/trunk@22577 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2020-08-11 18:58:59 +00:00
parent efd6e911f8
commit e93dffe858

View File

@ -9569,9 +9569,17 @@ sub CUL_HM_ActInfo() {# print detailed status information
my $state;
my (undef,$tSec)=CUL_HM_time2sec($attr{$devName}{actCycle});
if ($tSec != 0){
my $tLast = ReadingsVal($devName,".protLastRcv","0-0-0 0:0:0");
$tLast =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/;
my $x = $2*30*24*3600 + $3*24*3600 + $4*3600 + $5*60 +$6;
my $tLast = ReadingsVal($devName,".protLastRcv","00000000000000");
my $x;
if($tLast =~ m/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/){
$tLast =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/ ;
$x = $2*30*24*3600 + $3*24*3600 + $4*3600 + $5*60 +$6;
}
else{
$tLast =~ /(....)(..)(..)(..)(..)(..)/ ;
$x = $2*30*24*3600 + $3*24*3600 + $4*3600 + $5*60 +$6;
}
my @t = localtime($tod - $tSec); #time since when a trigger is expected
my $y = $x -