mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
98_readingsWatcher.pm: add AND / OR for readings
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21048 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dc63d15b53
commit
ccb328975a
@ -98,6 +98,7 @@ BEGIN {
|
||||
# Versions History intern
|
||||
our %vNotesIntern =
|
||||
(
|
||||
"1.7.1" => "25.01.20 fix ErrorValue 0",
|
||||
"1.7.0" => "12.01.20 add OR / AND watching",
|
||||
"1.6.0" => "27.08.19 package, Meta",
|
||||
"1.5.0" => "18.02.19",
|
||||
@ -402,8 +403,8 @@ sub OnTimer($)
|
||||
$d_d++; # Device Tote
|
||||
$timeouts++;
|
||||
$rts = ReadingsTimestamp($deviceName, $_,0);
|
||||
setReadingsVal($defs{$deviceName},$_,$errorValue,$rts) if ($errorValue && $rts); # leise setzen ohne Event
|
||||
$defs{$deviceName}->{STATE} = $errorValue if ($errorValue && $state);
|
||||
setReadingsVal($defs{$deviceName},$_,$errorValue,$rts) if (($errorValue ne'')&& $rts); # leise setzen ohne Event
|
||||
$defs{$deviceName}->{STATE} = $errorValue if (($errorValue ne'') && $state);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -424,6 +425,8 @@ sub OnTimer($)
|
||||
}#age
|
||||
else
|
||||
{
|
||||
setReadingsVal($defs{$deviceName},$_,'unknown',TimeNow()) if ($errorValue); # leise setzen ohne Event
|
||||
$defs{$deviceName}->{STATE} = 'unknown' if ($errorValue && $state);
|
||||
Log3 $name,3,$name.', reading Timestamp for '.$_.' not found on device '.$deviceName;
|
||||
readingsBulkUpdate($hash, $deviceName.'_'.$_, 'no Timestamp');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user