diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm
index 788c0afaf..e69309da3 100644
--- a/fhem/contrib/DS_Starter/76_SolarForecast.pm
+++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm
@@ -5347,6 +5347,7 @@ sub Attr {
if ($cmd eq 'set' && $aName =~ /^flowGraphicCss|flowGraphicSize|flowGraphicAnimate|flowGraphicConsumerDistance|flowGraphicShowConsumer|flowGraphicShowConsumerDummy|flowGraphicShowConsumerPower|flowGraphicShowConsumerRemainTime|flowGraphicShift$/) {
if (!$init_done) {
# return qq{Device "$name" -> The attribute '$aName' is replaced by 'flowGraphicControl'. Please press "save config" when restart is finished.};
+ Log3 ($name, 1, qq{$name - The attribute '$aName' is replaced by 'flowGraphicControl'. Please press "save config" when restart is finished.});
}
else {
return qq{The attribute '$aName' is obsolete and replaced by 'flowGraphicControl'.};
@@ -14205,8 +14206,6 @@ sub _flowGraphic {
my $cdist = $paref->{flowgconsDist}; # Abstand Consumer zueinander
my $lang = $paref->{lang};
- my $style = 'width:98%; height:'.$flowgsize.'px;';
- my $animation = $flowgani ? '@keyframes dash { to { stroke-dashoffset: 0; } }' : ''; # Animation Ja/Nein
my $cgc = ReadingsNum ($name, 'Current_GridConsumption', 0);
my $node2grid = ReadingsNum ($name, 'Current_GridFeedIn', 0); # vom Knoten zum Grid
my $cself = ReadingsNum ($name, 'Current_SelfConsumption', 0);
@@ -14302,32 +14301,30 @@ sub _flowGraphic {
$soc = 0;
}
- my $node2bat = $batin;
- my $grid_color = $node2grid ? 'flowg grid_color1' : 'flowg grid_color2'; # green : red
- my $cgc_style = $cgc ? 'flowg active_in' : 'flowg inactive_in'; # cgc current GridConsumption
- my $bat2home_style = $bat2home ? 'flowg active_out active_bat_out' : 'flowg inactive_in';
- $grid_color = 'flowg grid_color3' if(!$node2grid && !$cgc && $bat2home); # gray
- my $cgc_direction = 'M490,515 L670,590';
+ my $grid2home_style = $cgc ? 'flowg active_red' : 'flowg inactive'; # cgc current GridConsumption
+ my $bat2home_style = $bat2home ? 'flowg active_orange' : 'flowg inactive';
+ my $cgc_direction = 'M490,515 L670,590';
- if ($bat2home) { # Batterie wird entladen
+ if ($bat2home) { # Batterie wird ins Haus entladen
my $cgfo = $node2grid - $pv2node;
if ($cgfo > 1) {
- $cgc_style = 'flowg active_out';
- $cgc_direction = 'M670,590 L490,515';
- $node2grid -= $cgfo;
- $cgc = $cgfo;
+ $grid2home_style = 'flowg active_orange';
+ $cgc_direction = 'M670,590 L490,515';
+ $node2grid -= $cgfo;
+ $cgc = $cgfo;
}
}
my $bat2home_direction = 'M902,515 L730,590';
+ my $node2bat = $batin;
- if ($node2bat) { # Batterie wird geladen
- my $home2bat = $node2bat - $pv2node;
+ if ($batin) { # Batterie wird geladen
+ my $home2bat = $batin - ($pv2node + $pv2bat);
- if ($home2bat > 1) { # Batterieladung anteilig aus Hausnetz geladen
+ if ($home2bat > 1) { # Batterieladung wird anteilig aus Hausnetz geladen
$node2bat -= $home2bat;
- $bat2home_style = 'flowg active_in';
+ $bat2home_style = 'flowg active_red';
$bat2home_direction = 'M730,590 L902,515';
$bat2home = $home2bat;
}
@@ -14335,11 +14332,11 @@ sub _flowGraphic {
## Werte / SteuerungVars anpassen
###################################
- my $pnodesum = __normDecPlaces ($ppall + $pv2node); # Erzeugung Summe im Knoten
- $pnodesum += abs $node2bat if($node2bat < 0); # Batterie ist voll und SolarLader liefert an Knoten
- $node2bat -= $pv2bat; # Knoten -> Bat : abzüglich Direktladung
- $flowgcons = 0 if(!$consumercount); # Consumer Anzeige ausschalten wenn keine Consumer definiert
- my $pv2home = __normDecPlaces ($cself + $ppall); # Energiefluß vom Knoten zum Haus: Selbstverbrauch + alle Producer (Batterie-In/Solar-Ladegeräte sind nicht in SelfConsumtion enthalten)
+ my $pnodesum = __normDecPlaces ($ppall + $pv2node); # Erzeugung Summe im Knoten
+ $pnodesum += abs $node2bat if($node2bat < 0); # Batterie ist voll und SolarLader liefert an Knoten
+ $node2bat -= $pv2bat; # Knoten-Bat -> abzüglich Direktladung (pv2bat)
+ $flowgcons = 0 if(!$consumercount); # Consumer Anzeige ausschalten wenn keine Consumer definiert
+ my $node2home = __normDecPlaces ($cself + $ppall); # Energiefluß vom Knoten zum Haus: Selbstverbrauch + alle Producer (Batterie-In/Solar-Ladegeräte sind nicht in SelfConsumtion enthalten)
## SVG Box initialisieren mit Grid-Icon
@@ -14354,28 +14351,33 @@ sub _flowGraphic {
$vbhight += 100;
- my $vbox = "$vbminx $vbminy $vbwidth $vbhight";
+ my $vbox = "$vbminx $vbminy $vbwidth $vbhight";
+ my $svgstyle = 'width:98%; height:'.$flowgsize.'px;';
+ my $animation = $flowgani ? '@keyframes dash { to { stroke-dashoffset: 0; } }' : ''; # Animation Ja/Nein
+
+ my $grid_color = $node2grid ? 'flowg grid_green' :
+ !$node2grid && !$cgc && $bat2home ? 'flowg grid_gray' :
+ 'flowg grid_red';
+
+ # $grid_color = 'flowg grid_gray' if(!$node2grid && !$cgc && $bat2home);
my $ret = << "END0";
-