Lastwechselsperre nur ueber Vertrag melden
Tests / test (push) Failing after 39s

This commit is contained in:
dh
2026-09-17 09:33:40 +00:00
parent d4828f1ee5
commit 6c2d6ddcde
5 changed files with 23 additions and 21 deletions
+7 -13
View File
@@ -39,8 +39,6 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
'NachladenAktiv',
'LegionellenbetriebAktiv',
'LegioCounter',
'Idle',
'IdleCounter',
];
public function Create(): void
@@ -96,8 +94,6 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
$this->RegisterAttributeBoolean('ZustandNachladenAktiv', false);
$this->RegisterAttributeBoolean('ZustandLegionellenbetriebAktiv', false);
$this->RegisterAttributeInteger('ZustandLegioCounter', 0);
$this->RegisterAttributeBoolean('ZustandIdle', true);
$this->RegisterAttributeInteger('ZustandIdleCounter', 0);
$this->RegisterTimer(
'LastwechselFreigabe',
@@ -497,8 +493,6 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
$jetzt,
$this->ReadPropertyInteger('LastwechselSperrzeit')
);
$this->setzeZustand('IdleCounter', $restzeit);
$this->setzeZustand('Idle', $restzeit === 0);
$this->SetTimerInterval('LastwechselFreigabe', $restzeit > 0 ? $restzeit * 1000 : 0);
return $restzeit;
@@ -791,7 +785,6 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
$this->SetValue('Maximaltemperatur', 60.0);
$this->WriteAttributeFloat('ZustandLegionellentemperatur', 65.0);
$this->setzeZustand('Leistungsquelle', Nachrichtenvertrag::LEISTUNGSQUELLE_BERECHNET);
$this->setzeZustand('Idle', true);
$this->WriteAttributeBoolean('InitialwerteGesetzt', true);
}
@@ -842,6 +835,13 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
private function aktualisiereVariablen(): void
{
foreach (['Idle', 'IdleCounter'] as $ident) {
$variablenID = @IPS_GetObjectIDByIdent($ident, $this->InstanceID);
if (is_int($variablenID) && $variablenID > 0 && IPS_VariableExists($variablenID)) {
$this->UnregisterVariable($ident);
}
}
foreach (self::DIAGNOSE_VARIABLEN as $ident) {
if ($ident === 'Leistungsquelle') {
continue;
@@ -865,8 +865,6 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
220
);
$this->RegisterVariableInteger('LegioCounter', 'Zeit seit Legionellenabschluss', '', 230);
$this->RegisterVariableBoolean('Idle', 'Lastwechsel freigegeben', '~Switch', 240);
$this->RegisterVariableInteger('IdleCounter', 'Restzeit bis Lastwechsel', '', 250);
foreach (self::DIAGNOSE_VARIABLEN as $ident) {
$wert = $ident === 'Leistungsquelle'
@@ -923,13 +921,11 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
'TemperaturGueltig' => 'ZustandTemperaturGueltig',
'NachladenAktiv' => 'ZustandNachladenAktiv',
'LegionellenbetriebAktiv' => 'ZustandLegionellenbetriebAktiv',
'Idle' => 'ZustandIdle',
];
$integerAttribute = [
'Sollleistung' => 'ZustandSollleistung',
'AktiveStufe' => 'ZustandAktiveStufe',
'LegioCounter' => 'ZustandLegioCounter',
'IdleCounter' => 'ZustandIdleCounter',
];
$floatAttribute = [
'Istleistung' => 'ZustandIstleistung',
@@ -972,13 +968,11 @@ class VerbraucherWarmwassererwaermer extends IPSModule implements VerbraucherSch
'TemperaturGueltig' => 'ZustandTemperaturGueltig',
'NachladenAktiv' => 'ZustandNachladenAktiv',
'LegionellenbetriebAktiv' => 'ZustandLegionellenbetriebAktiv',
'Idle' => 'ZustandIdle',
];
$integerAttribute = [
'Sollleistung' => 'ZustandSollleistung',
'AktiveStufe' => 'ZustandAktiveStufe',
'LegioCounter' => 'ZustandLegioCounter',
'IdleCounter' => 'ZustandIdleCounter',
];
$floatAttribute = [
'Istleistung' => 'ZustandIstleistung',