hotfix(V10.0.2): ::status crash — is_pulse_active()compat + adapter.py fix

This commit is contained in:
Bernd (Hermes)
2026-08-05 18:10:02 +02:00
parent bd6db80017
commit e7668f9a97
2 changed files with 12 additions and 23 deletions
+12
View File
@@ -631,6 +631,18 @@ class PresenceEngine:
"""Liefere die aktuelle Phase (P1-P4)."""
return self._mediator.get_current_phase()
def is_pulse_active(self) -> bool:
"""V10.0.2 Hotfix: Kompatibilitäts-Methode für V9-Caller.
Liefert True wenn die Engine in P3 (GREEN_PULSE) oder P4 (RED_PULSE) ist,
d.h. der Mediator aktiv zwischen online/busy ↔ away toggelt.
Returns:
True wenn Puls aktiv, False sonst.
"""
phase = self._mediator.get_current_phase()
return phase in (Phase.GREEN_PULSE, Phase.RED_PULSE)
def get_counters(self) -> Dict[str, int]:
"""Liefere eine Kopie des Counter-Dicts (für Tests/Diagnose)."""
return dict(self.counters)