home-assistant/core · error · ConfigEntryNotReady
{exc}
Error message
{exc} What it means
Raised as ConfigEntryNotReady(exc) when async_connect_androidtv raises one of the configured ADB exception tuples: ADB_PYTHON_EXCEPTIONS (adb-shell/adb-home-python errors) when no ADB server IP is configured, or ADB_TCP_EXCEPTIONS (pure-python-adb / AndroidTV TCP errors) when CONF_ADB_SERVER_IP is set. The message is the raw exception text; setup retries with backoff.
Source
Thrown at homeassistant/components/androidtv/__init__.py:215
async_setup_services(hass)
return True
async def async_setup_entry(hass: HomeAssistant, entry: AndroidTVConfigEntry) -> bool:
"""Set up Android Debug Bridge platform."""
state_det_rules = entry.options.get(CONF_STATE_DETECTION_RULES)
if CONF_ADB_SERVER_IP not in entry.data:
exceptions = ADB_PYTHON_EXCEPTIONS
else:
exceptions = ADB_TCP_EXCEPTIONS
try:
aftv, error_message = await async_connect_androidtv(
hass, entry.data, state_detection_rules=state_det_rules
)
except exceptions as exc:
raise ConfigEntryNotReady(exc) from exc
if not aftv:
raise ConfigEntryNotReady(error_message)
async def async_close_connection(event: Event) -> None:
"""Close Android Debug Bridge connection on HA Stop."""
await aftv.adb_close()
entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, async_close_connection)
)
entry.async_on_unload(entry.add_update_listener(update_listener))
entry.runtime_data = AndroidTVRuntimeData(aftv, entry.options.copy())
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return TrueView on GitHub (pinned to 58a3fdb3ea)
Solutions
- Confirm the TV is on, reachable (ping), and Developer Options > USB/Network debugging is enabled.
- Verify the device IP in the config entry; set a DHCP reservation for the TV.
- If using an ADB server (adb_server_ip set), ensure adb is installed and the server is running.
- For direct connections, run 'adb tcpip 5555' once from a computer to enable network ADB.
Defensive patterns
Strategy: retry
Validate before calling
import socket
# before connecting, probe the ADB endpoint
with socket.socket() as s:
s.settimeout(3)
adb_reachable = s.connect_ex((entry.data['host'], 5555)) == 0 Try / catch
except ConfigEntryNotReady: retry is automatic; distinguish auth vs unreachable via the chained exception text before touching config.
Prevention
- Enable network ADB (adb tcpip 5555 / Developer Options) before setup.
- Reserve the TV's DHCP address.
- Keep an ADB server running and its IP configured if devices rotate.
When it happens
Trigger: async_connect_androidtv tries to open the ADB connection to the Android TV: direct TCP to device port 5555 (python impl) or to the configured adb server. Failures: device off/unreachable, ADB debugging disabled, wrong IP, adb server not running, or authentication not accepted.
Common situations: TV powered off or in deep standby (very common), 'USB debugging / Network debugging' toggled off on the device, adb-over-TCP not enabled (adb tcpip 5555), a stale IP after DHCP renewal, or a missing/unstarted external ADB server.
Related errors
- {error_message}
- Could not fetch integration list
- Error connecting to {host}:{port}
- supervisor_not_ready
- failed_send
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/7cdcf9b921303ea7.
Report an issue: GitHub.