mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 20:17:45 +00:00
76_SolarForecast.pm: contrib 0.1.0
git-svn-id: https://svn.fhem.de/fhem/trunk@23380 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
787eb6fccd
commit
2775f22d8c
@ -749,6 +749,9 @@ sub _transferInverterValues {
|
|||||||
|
|
||||||
my $tlim = "0|23"; # Stunde 0/23 -> bestimmte Aktionen
|
my $tlim = "0|23"; # Stunde 0/23 -> bestimmte Aktionen
|
||||||
|
|
||||||
|
my $sr = (split ":", ReadingsVal($name, "Today_SunRise", "00:00"))[0];
|
||||||
|
my $ss = (split ":", ReadingsVal($name, "Today_SunSet", "00:00"))[0];
|
||||||
|
|
||||||
if($chour =~ /^($tlim)$/x) {
|
if($chour =~ /^($tlim)$/x) {
|
||||||
deleteReadingspec ($hash, "Today_Hour.*_PV.*");
|
deleteReadingspec ($hash, "Today_Hour.*_PV.*");
|
||||||
#my @allrds = keys %{$hash->{READINGS}};
|
#my @allrds = keys %{$hash->{READINGS}};
|
||||||
@ -774,7 +777,10 @@ sub _transferInverterValues {
|
|||||||
|
|
||||||
my $edaypast = 0;
|
my $edaypast = 0;
|
||||||
for my $h (0..int($chour)-1) { # alle bisherigen Erzeugungen des Tages summieren
|
for my $h (0..int($chour)-1) { # alle bisherigen Erzeugungen des Tages summieren
|
||||||
deleteReadingspec ($hash, "Today_Hour00_PV.*");
|
if($h <= int($sr)-3) {
|
||||||
|
readingsSingleUpdate($hash, "Today_Hour".sprintf("%02d",$h)."_PVreal", "0 Wh", 0);
|
||||||
|
next;
|
||||||
|
}
|
||||||
$edaypast += ReadingsNum ($name, "Today_Hour".sprintf("%02d",$h)."_PVreal", 0);
|
$edaypast += ReadingsNum ($name, "Today_Hour".sprintf("%02d",$h)."_PVreal", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user