Fix device online state clobbered by debug ping in _status_changed

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.
This commit is contained in:
Ken Sanislo 2026-03-04 14:16:28 -07:00
parent 9e36ede037
commit 3d2c8a351f
1 changed files with 0 additions and 1 deletions

View File

@ -115,7 +115,6 @@ class SolaarListener(listener.EventsListener):
reason or "",
)
else:
device.ping()
logger.info(
"status_changed %r: %s %s (%X) %s",
device,