diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm
index 197d8a7dd..86c49a926 100644
--- a/fhem/contrib/DS_Starter/76_SolarForecast.pm
+++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm
@@ -165,7 +165,8 @@ my %vNotesIntern = (
"set reset aiData deletes raw data also, _transferAPIRadiationValues: AI PV estimate limited to inverter capacity summary ".
"__calcPVestimates: pv power summary of all strings connected to inverter limited to inverter capacity summary ".
"_batChargeRecmd: fix calc if more than one batteries are installed, set aiDecTree: new option rawDataGHIreplace ".
- "new Attr plantControl with key feedinPowerLimit, batteryPreferredCharge , Attr affectBatteryPreferredCharge is obsolete ",
+ "new Attr plantControl with keys feedinPowerLimit, batteryPreferredCharge, consForecastInPlanning ".
+ "Attr affectBatteryPreferredCharge, affectConsForecastInPlanning are obsolete ",
"1.48.0" => "14.03.2025 edit commandref, add graphicBeam layer 5 and 6, attr ctrlAIdataStorageDuration, ctrlAIshiftTrainStart removed ",
"1.47.3" => "11.03.2025 adjust weather_ids and management of significant weather, _calcDataEveryFullHour: change attrInvChangedTs Management ".
"split __batteryOnBeam into _beamFillupBatValues and itself, expand bat key 'show' by top, bottom ".
@@ -568,7 +569,7 @@ my @rconfigs = qw( pvCorrectionFactor_Auto
);
# Anlagenkonfiguration: maßgebliche Attribute
my @aconfigs = qw( affectConsForecastIdentWeekdays
- affectConsForecastInPlanning affectSolCastPercentile
+ affectSolCastPercentile
aiControl
consumerLegend consumerAdviceIcon consumerLink
ctrlBackupFilesKeep
@@ -1528,7 +1529,6 @@ sub Initialize {
$hash->{NotifyFn} = \&Notify;
$hash->{ReadyFn} = \&runTask;
$hash->{AttrList} = "affectConsForecastIdentWeekdays:1,0 ".
- "affectConsForecastInPlanning:1,0 ".
"affectConsForecastLastDays:selectnumbers,1,1,180,0,lin ".
"affectSolCastPercentile:select,10,50,90 ".
"aiControl:textField-long ".
@@ -1594,7 +1594,7 @@ sub Initialize {
### nicht mehr benötigte Daten verarbeiten - Bereich kann später wieder raus !!
##########################################################################################################################
my $av = 'obsolete#-#use#attr#plantControl#instead';
- $hash->{AttrList} .= " affectBatteryPreferredCharge:$av "; # 21.03.2025
+ $hash->{AttrList} .= " affectBatteryPreferredCharge:$av affectConsForecastInPlanning:$av"; # 22.03.2025
##########################################################################################################################
$hash->{FW_hideDisplayName} = 1; # Forum 88667
@@ -5874,7 +5874,7 @@ sub Attr {
### nicht mehr benötigte Daten verarbeiten - Bereich kann später wieder raus !!
######################################################################################################################
- if ($cmd eq 'set' && $aName =~ /^affectBatteryPreferredCharge$/) { # 21.03.2025
+ if ($cmd eq 'set' && $aName =~ /^affectBatteryPreferredCharge|affectConsForecastInPlanning$/) { # 22.03.2025
#my $msg = "The attribute $aName is obsolete and will be deleted soon. Please press 'save config' when restart is finished.";
my $msg = "The attribute $aName is replaced by 'plantControl'.";
if (!$init_done) {
@@ -6349,8 +6349,9 @@ sub _attrplantControl { ## no critic "not used"
my $hash = $defs{$name};
- for my $av ( qw( feedinPowerLimit
- batteryPreferredCharge
+ for my $av ( qw( batteryPreferredCharge
+ consForecastInPlanning
+ feedinPowerLimit
) ) {
delete $data{$name}{current}{$av};
@@ -6358,8 +6359,9 @@ sub _attrplantControl { ## no critic "not used"
if ($cmd eq 'set') {
my $valid = {
- feedinPowerLimit => '\d+',
batteryPreferredCharge => '([0-9]|[1-9][0-9]|100)',
+ consForecastInPlanning => '0|1',
+ feedinPowerLimit => '\d+',
};
my ($a, $h) = parseParams ($aVal);
@@ -7978,15 +7980,25 @@ sub centralTask {
### nicht mehr benötigte Daten verarbeiten - Bereich kann später wieder raus !!
##########################################################################################################################
#delete $data{$name}{circular}{'00'}; # 04.02.2025
- readingsDelete ($hash, '.migrated'); # 01.02.25
+ readingsDelete ($hash, '.migrated'); # 01.02.25
- my $pcb = AttrVal ($name, 'affectBatteryPreferredCharge', undef); # 22.03.2025
- ::CommandDeleteAttr (undef, "$name affectBatteryPreferredCharge") if(defined $pcb);
+ my $pcb = AttrVal ($name, 'affectBatteryPreferredCharge', undef); # 22.03.2025
my $apc = AttrVal ($name, 'plantControl', '');
if (defined $pcb) {
- my $newval = $apc." batteryPreferredCharge=$pcb" if(defined $pcb);
+ my $newval = $apc." batteryPreferredCharge=$pcb";
CommandAttr (undef, "$name plantControl $newval");
+ ::CommandDeleteAttr (undef, "$name affectBatteryPreferredCharge");
+ }
+ ######
+
+ my $afp = AttrVal ($name, 'affectConsForecastInPlanning', undef); # 22.03.2025
+ my $pc1 = AttrVal ($name, 'plantControl', '');
+
+ if (defined $afp) {
+ my $newval = $apc." consForecastInPlanning=$afp";
+ CommandAttr (undef, "$name plantControl $newval");
+ ::CommandDeleteAttr (undef, "$name affectConsForecastInPlanning");
}
######
@@ -11380,17 +11392,17 @@ sub ___doPlanning {
my $debug = $paref->{debug};
my $lang = $paref->{lang};
my $nh = $data{$name}{nexthours};
- my $cicfip = AttrVal ($name, 'affectConsForecastInPlanning', 0); # soll Consumption Vorhersage in die Überschußermittlung eingehen ?
+ my $cicfip = CurrentVal ($name, 'consForecastInPlanning', 0); # soll Consumption Vorhersage in die Überschußermittlung eingehen ?
my $hash = $defs{$name};
- debugLog ($paref, "consumerPlanning", qq{consumer "$c" - consider consumption forecast in consumer planning (attr 'affectConsForecastInPlanning'): }.($cicfip ? 'yes' : 'no'));
+ debugLog ($paref, "consumerPlanning", qq{consumer "$c" - consider consumption forecast in consumer planning (attr 'plantControl'): }.($cicfip ? 'yes' : 'no'));
my %max;
my %mtimes;
- ## max. PV-Forecast bzw. Überschuß (bei gesetzen affectConsForecastInPlanning) ermitteln
- ##########################################################################################
+ ## max. PV-Forecast bzw. Überschuß (bei gesetzen consForecastInPlanning) ermitteln
+ ####################################################################################
for my $idx (sort keys %{$nh}) {
my $pvfc = NexthoursVal ($hash, $idx, 'pvfc', 0);
my $confcex = NexthoursVal ($hash, $idx, 'confcEx', 0); # prognostizierter Verbrauch ohne registrierte Consumer mit gesetzten Schlüssel exconfc
@@ -23914,15 +23926,6 @@ to ensure that the system configuration is correct.