From ab22b993b9506e27972fb989a145b1a13b454cb7 Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Sun, 10 Mar 2024 15:32:10 +0000 Subject: [PATCH] 98_monitoring: fix timespec problems #126515 git-svn-id: https://svn.fhem.de/fhem/trunk@28633 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_monitoring.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/98_monitoring.pm b/fhem/FHEM/98_monitoring.pm index 26569fce5..50e2cb72b 100644 --- a/fhem/FHEM/98_monitoring.pm +++ b/fhem/FHEM/98_monitoring.pm @@ -61,6 +61,7 @@ BEGIN { AnalyzePerlCommand perlSyntaxCheck FmtDateTime time_str2num + GetTimeSpec notifyRegexpChanged deviceEvents ) ) @@ -360,7 +361,15 @@ sub Notify { # CMD ausführen my $listWait = AnalyzePerlCommand( $hash, $cmd ); - $listWait = 0 if !looks_like_number($listWait); + if (!looks_like_number($listWait)) { + my ( $err, $hour, $min, $sec, $fn ) = GetTimeSpec($listWait); + if ($err) { + Log3($SELF, 2 , qq($TYPE ($SELF) returns no number for "$listWait" in $ĺist attribute evaluation!)); + $listWait = 0; + } else { + $listWait = 3600 * $hour + 60 * $min + $sec; + } + } if ( $listFuncAdd eq 'preset' && $listFuncRemove eq 'preset' ) { Log3(