From 3d2c8a351f198451a2ba8e8253cdda58739926fa Mon Sep 17 00:00:00 2001 From: Ken Sanislo Date: Wed, 4 Mar 2026 14:16:28 -0700 Subject: [PATCH] Fix device online state clobbered by debug ping in _status_changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The INFO-level logging guard in _status_changed() called device.ping() before logging, purely to show accurate online status. But ping() has side effects — it sets device.online based on the result. When a ConnectionStateChangedEvent correctly marked a device online, the subsequent _status_changed() callback would re-ping. If the device wasn't ready yet (e.g. Centurion headset still booting), the ping timed out and set online back to False, requiring 2-3 power cycles to sync state. Remove the unnecessary ping — the log message already reads device.online which reflects the state set by the event handler. --- lib/solaar/listener.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/solaar/listener.py b/lib/solaar/listener.py index 1776e140..4aee6700 100644 --- a/lib/solaar/listener.py +++ b/lib/solaar/listener.py @@ -115,7 +115,6 @@ class SolaarListener(listener.EventsListener): reason or "", ) else: - device.ping() logger.info( "status_changed %r: %s %s (%X) %s", device,