2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

fhem.pl: Change ReadingsAge (Forum #50783)

git-svn-id: https://svn.fhem.de/fhem/trunk@11066 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-03-13 20:20:18 +00:00
parent c2473229e5
commit 310850cc85

View File

@ -3712,7 +3712,9 @@ sub
ReadingsAge($$$)
{
my ($device,$reading,$default) = @_;
return time() - time_str2num(ReadingsTimestamp($device,$reading,$default));
my $ts = ReadingsTimestamp($device,$reading,undef);
return time() - time_str2num($ts) if(defined($ts));
return $default;
}
sub