2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

76_SolarForecast: contrib 0.79.1

git-svn-id: https://svn.fhem.de/fhem/trunk@27593 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2023-05-19 18:29:59 +00:00
parent 5162f4df38
commit 41559ebe22

View File

@ -2112,6 +2112,7 @@ sub _getRoofTopData {
## statische SolCast API Kennzahlen bereitstellen
###################################################
my %seen;
my $debug = AttrVal ($name, 'ctrlDebug', 'none');
my @as = map { $data{$type}{$name}{solcastapi}{'?IdPair'}{$_}{apikey}; } keys %{$data{$type}{$name}{solcastapi}{'?IdPair'}};
my @unique = grep { !$seen{$_}++ } @as;
my $upc = scalar @unique; # Anzahl unique API Keys
@ -2124,6 +2125,13 @@ sub _getRoofTopData {
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{solCastAPIcallMultiplier} = $mpk;
$data{$type}{$name}{solcastapi}{'?All'}{'?All'}{todayMaxAPIcalls} = $madr;
if($debug =~ /solcastAPIcall/x) {
Log3 ($name, 1, "$name DEBUG> SolCast API Call - count unique API Keys: $upc");
Log3 ($name, 1, "$name DEBUG> SolCast API Call - all strings count: $asc");
Log3 ($name, 1, "$name DEBUG> SolCast API Call - max possible daily API calls: $asc");
Log3 ($name, 1, "$name DEBUG> SolCast API Call - Requestmultiplier: $mpk");
}
##
$paref->{allstrings} = ReadingsVal($name, 'inverterStrings', '');