feat(pyproject): androidtvremote2 dev dependency; manager docstring covers both transports
This commit is contained in:
1 parent
27cc69b1d3
commit
49cf402bbe
2 files changed
+14
-1
No files matched your search
@@ -123,11 +123,23 @@ class StateStore:
|
||||
|
||||
|
||||
class ShieldConnectionManager:
|
||||
"""Owner of one entry's persistent ADB connection and state.
|
||||
"""Owner of one entry's persistent connections (both transports) + state.
|
||||
|
||||
Transport A — ADB (adb_shell): the watchdog keeps a persistent socket,
|
||||
pulls heartbeats and reconnects with its own backoff ladder.
|
||||
Transport B — remote protocol (androidtvremote2, Phase 2): the library
|
||||
owns reconnection (``keep_reconnecting`` with internal backoff), pushes
|
||||
``is_on``/``is_available``/``current_app``/``volume_info`` into the state
|
||||
store, and surfaces invalid certs (device hard reset) via a reauth hook.
|
||||
|
||||
:param poller_factory: builds the ADB poller when the watchdog starts;
|
||||
skipped entirely for entries without ADB (passive manager) or tests
|
||||
that inject a ready-to-use ``poller`` directly.
|
||||
:param protocol_factory: builds the AndroidTVRemote client; instead pass
|
||||
``protocol_settings`` (host/client_name/certfile/keyfile) and the
|
||||
manager builds it, or ``protocol`` directly (tests).
|
||||
:param invalid_auth_callback: called when the device rejects our
|
||||
certificates (hard reset) — the entry-owned reauth hook (t9).
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
||||
@@ -14,6 +14,7 @@ dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-asyncio>=0.23",
|
||||
"ruff>=0.4",
|
||||
"androidtvremote2>=0.2.0",
|
||||
]
|
||||
# The shared ADB helpers are vendored at
|
||||
# custom_components/nvidia_shield/ha_adb_common/ — the only consumed copy in
|
||||
|
||||
Reference in new issue
Block a user