This commit is contained in:
@@ -92,6 +92,7 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
|
||||
$this->RegisterAttributeBoolean('ZustandAenderungMoeglich', false);
|
||||
$this->RegisterAttributeBoolean('ZustandTemperaturGueltig', false);
|
||||
$this->RegisterAttributeBoolean('ZustandNachladenAktiv', false);
|
||||
$this->RegisterAttributeBoolean('MaximaltemperaturErreicht', false);
|
||||
$this->RegisterAttributeBoolean('ZustandLegionellenbetriebAktiv', false);
|
||||
$this->RegisterAttributeInteger('ZustandLegioCounter', 0);
|
||||
|
||||
@@ -362,7 +363,13 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
|
||||
(float) $this->ReadAttributeFloat('ZustandLegionellentemperatur')
|
||||
);
|
||||
$hysterese = $this->ReadPropertyFloat('Hysterese');
|
||||
$aktuelleLeistung = (int) round((float) $this->leseZustand('Istleistung'));
|
||||
$maximaltemperaturErreicht = $this->ReadAttributeBoolean('MaximaltemperaturErreicht');
|
||||
if ($temperatur >= $maximum) {
|
||||
$maximaltemperaturErreicht = true;
|
||||
} elseif ($temperatur <= $maximum - $hysterese) {
|
||||
$maximaltemperaturErreicht = false;
|
||||
}
|
||||
$this->WriteAttributeBoolean('MaximaltemperaturErreicht', $maximaltemperaturErreicht);
|
||||
|
||||
$nachladen = (bool) $this->leseZustand('NachladenAktiv');
|
||||
if ($temperatur < $minimum) {
|
||||
@@ -390,12 +397,9 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
|
||||
if ($nachladen || $zeitplanErfordertHeizen) {
|
||||
return [[$maximalleistung], false, true, $maximalleistung];
|
||||
}
|
||||
if ($temperatur >= $maximum) {
|
||||
if ($maximaltemperaturErreicht) {
|
||||
return [[0], false, true, 0];
|
||||
}
|
||||
if ($aktuelleLeistung > 0 && $temperatur >= $maximum - $hysterese) {
|
||||
return [[$aktuelleLeistung], false, true, $aktuelleLeistung];
|
||||
}
|
||||
|
||||
return [$alleLeistungen, true, true, null];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user