testing #29

Merged
marko merged 73 commits from testing into main 2023-01-07 12:49:01 +00:00
Showing only changes of commit b6c0dc2ef1 - Show all commits

View File

@ -334,18 +334,18 @@ sub Weather_DeleteReadings {
my $name = $hash->{NAME}; my $name = $hash->{NAME};
my $forecastConfig = Weather_ForcastConfig($hash); my $forecastConfig = Weather_ForcastConfig($hash);
my $forecastLimit = AttrVal( $name, 'forecastLimit', 5 ); my $forecastLimit = AttrVal( $name, 'forecastLimit', 5 ) + 1;
my $forecastLimitNoForecast = 1; my $forecastLimitNoForecast = 1;
$forecastLimit = $forecastLimitNoForecast $forecastLimit = $forecastLimitNoForecast
if ( !$forecastConfig->{daily} ); if ( !$forecastConfig->{daily} );
CommandDeleteReading( undef, CommandDeleteReading( undef,
$name . ' ' . 'fc[' . $forecastLimit . '-99]_.*' ); $name . ' ' . 'fc[' . $forecastLimit . '-9][0-9]?_.*' );
$forecastLimit = $forecastLimitNoForecast $forecastLimit = $forecastLimitNoForecast
if ( !$forecastConfig->{hourly} ); if ( !$forecastConfig->{hourly} );
CommandDeleteReading( undef, CommandDeleteReading( undef,
$name . ' ' . 'hfc[' . $forecastLimit . '-99]_.*' ); $name . ' ' . 'hfc[' . $forecastLimit . '-9][0-9]?_.*' );
return; return;
} }