2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-29 23:47:10 +00:00

98_monitoring: fix timespec problems #126515

git-svn-id: https://svn.fhem.de/fhem/trunk@28633 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2024-03-10 15:32:10 +00:00
parent 2bd9a5a58b
commit ab22b993b9

View File

@ -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(