2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 22:26:04 +00:00

76_SolarForecast.pm: contrib 0.68.4

git-svn-id: https://svn.fhem.de/fhem/trunk@26477 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2022-10-03 13:53:49 +00:00
parent b3749a3ad3
commit dcadaaa271

View File

@ -4658,12 +4658,11 @@ sub __setConsRcmdState {
my $type = $hash->{TYPE};
my $surplus = CurrentVal ($hash, "surplus", 0); # aktueller Energieüberschuß
my $ccons = CurrentVal ($hash, 'consumption', 0); # aktueller Verbrauch
my $nompower = ConsumerVal ($hash, $c, "power", 0); # Consumer nominale Leistungsaufnahme (W)
my $ccr = AttrVal ($name, 'createConsumptionRecReadings', ''); # Liste der Consumer für die ConsumptionRecommended-Readings erstellt werden sollen
my $rescons = isConsumerPhysOn($hash, $c) ? $ccons : $ccons + $nompower; # resultierender Verbauch nach Einschaltung Consumer
my $rescons = isConsumerPhysOn($hash, $c) ? 0 : $nompower; # resultierender Verbauch nach Einschaltung Consumer
if (!$nompower || $surplus + $ccons >= $rescons) {
if (!$nompower || $surplus - $rescons > 0) {
$data{$type}{$name}{consumers}{$c}{isConsumptionRecommended} = 1; # Einschalten des Consumers günstig
}
else {