mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +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:
parent
c2473229e5
commit
310850cc85
@ -3712,7 +3712,9 @@ sub
|
|||||||
ReadingsAge($$$)
|
ReadingsAge($$$)
|
||||||
{
|
{
|
||||||
my ($device,$reading,$default) = @_;
|
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
|
sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user