mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 20:17:45 +00:00
fhem.pl: add ReadingsAge (Forum #50783)
git-svn-id: https://svn.fhem.de/fhem/trunk@11065 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bd59852c1b
commit
c2473229e5
@ -3708,6 +3708,13 @@ ReadingsTimestamp($$$)
|
|||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
ReadingsAge($$$)
|
||||||
|
{
|
||||||
|
my ($device,$reading,$default) = @_;
|
||||||
|
return time() - time_str2num(ReadingsTimestamp($device,$reading,$default));
|
||||||
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
Value($)
|
Value($)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user