mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 09:55:38 +00:00
76_SolarForecast: possible Illegal division by zero if Battery SOC management is activated
git-svn-id: https://svn.fhem.de/fhem/trunk@28804 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
df3918e55e
commit
0778abf8b1
@ -8149,15 +8149,15 @@ sub _batSocTarget {
|
||||
my $ltsmsr = CircularVal ($hash, 99, 'lastTsMaxSocRchd', undef);
|
||||
my $batcharge = CurrentVal ($hash, 'batcharge', 0); # aktuelle Ladung in %
|
||||
my $batinstcap = CurrentVal ($hash, 'batinstcap', 0); # installierte Batteriekapazität Wh
|
||||
my $cgbt = AttrVal ($name, 'ctrlBatSocManagement', undef);
|
||||
|
||||
if (!$batinstcap) {
|
||||
if ($cgbt && !$batinstcap) {
|
||||
Log3 ($name, 1, "$name - WARNING - Attribute ctrlBatSocManagement is active, but the required key 'cap' is not setup in currentBatteryDev. Exit.");
|
||||
return;
|
||||
}
|
||||
|
||||
__batSaveSocKeyFigures ($paref) if(!$ltsmsr || $batcharge >= $maxSoCdef || $oldd2care < 0);
|
||||
|
||||
my $cgbt = AttrVal ($name, 'ctrlBatSocManagement', undef);
|
||||
my ($lowSoc, $upSoc, $maxsoc, $careCycle) = __parseAttrBatSoc ($name, $cgbt);
|
||||
return if(!$lowSoc ||!$upSoc);
|
||||
|
||||
|
@ -8149,15 +8149,15 @@ sub _batSocTarget {
|
||||
my $ltsmsr = CircularVal ($hash, 99, 'lastTsMaxSocRchd', undef);
|
||||
my $batcharge = CurrentVal ($hash, 'batcharge', 0); # aktuelle Ladung in %
|
||||
my $batinstcap = CurrentVal ($hash, 'batinstcap', 0); # installierte Batteriekapazität Wh
|
||||
my $cgbt = AttrVal ($name, 'ctrlBatSocManagement', undef);
|
||||
|
||||
if (!$batinstcap) {
|
||||
if ($cgbt && !$batinstcap) {
|
||||
Log3 ($name, 1, "$name - WARNING - Attribute ctrlBatSocManagement is active, but the required key 'cap' is not setup in currentBatteryDev. Exit.");
|
||||
return;
|
||||
}
|
||||
|
||||
__batSaveSocKeyFigures ($paref) if(!$ltsmsr || $batcharge >= $maxSoCdef || $oldd2care < 0);
|
||||
|
||||
my $cgbt = AttrVal ($name, 'ctrlBatSocManagement', undef);
|
||||
my ($lowSoc, $upSoc, $maxsoc, $careCycle) = __parseAttrBatSoc ($name, $cgbt);
|
||||
return if(!$lowSoc ||!$upSoc);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user