From e59d93a3b45238d42979eb1248274432b7746f88 Mon Sep 17 00:00:00 2001 From: DS_Starter Date: Sun, 24 Jan 2021 20:06:33 +0000 Subject: [PATCH] 76_SolarForecast.pm: contrib 0.4.0 git-svn-id: https://svn.fhem.de/fhem/trunk@23610 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index e93b5f24a..3264324b0 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -1445,9 +1445,10 @@ sub forecastGraphic { my $pv0 = ReadingsNum ($name, "ThisHour_PVforecast", undef); my $ma = ReadingsNum ($name, "moduleArea", 0); # Solar Modulfläche (qm) - my $moddir = ReadingsVal ($name, "moduleDirection", ""); # aktuelles Inverter Device + my $moddir = ReadingsVal ($name, "moduleDirection", ""); # aktuelles Inverter Device + my $ta = ReadingsNum ($name, "moduleTiltAngle", undef); # Neigungswinkel Solarmodule - if(!$fcdev || !$ma || !defined $pv0 || !$moddir) { + if(!$fcdev || !$ma || !defined $pv0 || !$moddir || !defined $ta) { $height = AttrNum($name, 'beamHeight', 200); $ret .= ""; $ret .= ""; @@ -1465,6 +1466,9 @@ sub forecastGraphic { elsif(!$moddir) { $ret .= qq{Please specify the module Direction with "set $name moduleDirection"}; } + elsif(!defined $ta) { + $ret .= qq{Please specify the module tilt angle with "set $name moduleTiltAngle"}; + } elsif(!defined $pv0) { $ret .= qq{Awaiting data from selected Solar Forecast device ...}; }