This commit is contained in:
@@ -24,12 +24,16 @@ trait VerbraucherBasisTrait
|
||||
$this->RegisterVariableBoolean('Aktiv', 'Aktiv', '~Switch', 10);
|
||||
$this->EnableAction('Aktiv');
|
||||
$this->RegisterVariableFloat('Istleistung', 'Istleistung', '', 20);
|
||||
$this->RegisterVariableInteger('Leistungsquelle', 'Leistungsquelle', '', 30);
|
||||
$this->RegisterVariableInteger('Sollleistung', 'Sollleistung', '', 40);
|
||||
$this->RegisterVariableBoolean('SollwertGueltig', 'Sollwert gueltig', '~Switch', 50);
|
||||
$this->RegisterVariableBoolean('Verfuegbar', 'Verfuegbar', '~Switch', 60);
|
||||
$this->RegisterVariableBoolean('AenderungMoeglich', 'Aenderung moeglich', '~Switch', 70);
|
||||
$this->RegisterVariableBoolean('Stoerung', 'Stoerung', '', 80);
|
||||
$this->RegisterVariableString('Stoertext', 'Stoertext', '', 90);
|
||||
}
|
||||
|
||||
protected function registriereVerbraucherDiagnose(): void
|
||||
{
|
||||
$this->RegisterVariableInteger('Leistungsquelle', 'Leistungsquelle', '', 30);
|
||||
$this->RegisterVariableBoolean('SollwertGueltig', 'Sollwert gueltig', '~Switch', 50);
|
||||
$this->RegisterVariableBoolean('Verfuegbar', 'Verfuegbar', '~Switch', 60);
|
||||
$this->RegisterVariableBoolean('AenderungMoeglich', 'Aenderung moeglich', '~Switch', 70);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +138,32 @@ final class WarmwasserRegler
|
||||
return $verfuegbareWaermeJ >= $erforderlicheWaermeJ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{0: float, 1: float}
|
||||
*/
|
||||
public static function legionellenTemperaturgrenzen(
|
||||
bool $aktiv,
|
||||
int $sekundenSeitAbschluss,
|
||||
int $minimalintervallTage,
|
||||
int $maximalintervallTage,
|
||||
float $mindesttemperatur,
|
||||
float $maximaltemperatur,
|
||||
float $legionellentemperatur
|
||||
): array {
|
||||
if (!$aktiv) {
|
||||
return [$mindesttemperatur, $maximaltemperatur];
|
||||
}
|
||||
|
||||
if ($sekundenSeitAbschluss >= $minimalintervallTage * 86400) {
|
||||
$maximaltemperatur = $legionellentemperatur;
|
||||
}
|
||||
if ($sekundenSeitAbschluss >= $maximalintervallTage * 86400) {
|
||||
$mindesttemperatur = $legionellentemperatur;
|
||||
}
|
||||
|
||||
return [$mindesttemperatur, $maximaltemperatur];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{Zeitpunkt: int, Solltemperatur: float}|null
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user