fix(battery): keep native timer callbacks reload-safe
Tests / test (push) Failing after 53s

This commit is contained in:
dh
2026-10-08 05:15:27 +00:00
parent 5885681669
commit d42cfb3342
10 changed files with 535 additions and 6 deletions
+10 -4
View File
@@ -133,22 +133,22 @@ class Batterie extends IPSModule implements VerbraucherSchnittstelle
$this->RegisterTimer(
'Meldezyklus',
0,
"IPS_RequestAction(\$_IPS['TARGET'], 'Melden', false);"
"ENELIX_BatterieTimerAktion(\$_IPS['TARGET'], 'Melden', false);"
);
$this->RegisterTimer(
'RueckmeldungVerzoegert',
0,
"IPS_RequestAction(\$_IPS['TARGET'], 'Melden', true);"
"ENELIX_BatterieTimerAktion(\$_IPS['TARGET'], 'Melden', true);"
);
$this->RegisterTimer(
'VorgabeTimeout',
0,
"IPS_RequestAction(\$_IPS['TARGET'], 'VorgabeTimeout', 0);"
"ENELIX_BatterieTimerAktion(\$_IPS['TARGET'], 'VorgabeTimeout', false);"
);
$this->RegisterTimer(
'AenderungFreigabe',
0,
"IPS_RequestAction(\$_IPS['TARGET'], 'AenderungFreigabe', 0);"
"ENELIX_BatterieTimerAktion(\$_IPS['TARGET'], 'AenderungFreigabe', false);"
);
}
@@ -220,6 +220,12 @@ class Batterie extends IPSModule implements VerbraucherSchnittstelle
}
}
/** Keep timer execution in the generated module wrapper during module reload. */
public function BatterieTimerAktion(string $ident, bool $wert): void
{
$this->RequestAction($ident, $ident === 'Melden' ? $wert : 0);
}
public function RequestAction($ident, $wert): void
{
switch ($ident) {