hotfix(V10.0.2): ::status crash — is_pulse_active()compat + adapter.py fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user