2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

59_Twilight.pm: fix ReadingsAge in Weather dispatch function

git-svn-id: https://svn.fhem.de/fhem/trunk@23082 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2020-11-03 06:20:18 +00:00
parent 5cb5e88f30
commit f77587ff7d

View File

@ -1027,7 +1027,7 @@ sub getwTYPE_Weather {
my $extDev = $hash->{helper}{extWeather}{Device}; my $extDev = $hash->{helper}{extWeather}{Device};
my ($hour, $sr_hour, $ss_hour) = getTwilightHours($hash); my ($hour, $sr_hour, $ss_hour) = getTwilightHours($hash);
my $rAge = int(ReadingsAge("extDev","cloudCover",0)/3600); my $rAge = int(ReadingsAge($extDev,"cloudCover",0)/3600);
$ret[0] = $rAge < 24 ? ReadingsNum($extDev,"cloudCover",0) : 50; $ret[0] = $rAge < 24 ? ReadingsNum($extDev,"cloudCover",0) : 50;
Log3( $hash, 5, "[$hash->{NAME}] function is called, cc is $ret[0], hours sr: $sr_hour, ss: $ss_hour" ); Log3( $hash, 5, "[$hash->{NAME}] function is called, cc is $ret[0], hours sr: $sr_hour, ss: $ss_hour" );