home-assistant/core · warning · TimeoutError
No radiofrequency found within {LEARNING_TIMEOUT.total_secon
Error message
No radiofrequency found within {LEARNING_TIMEOUT.total_seconds()} seconds What it means
TimeoutError raised by _async_learn_rf_command: during the RF sweep the loop polls device.api.check_frequency every second; if the while loop exhausts LEARNING_TIMEOUT without a detected frequency, it cancels the sweep (cancel_sweep_frequency) and raises. Note it is the loop's else branch, so it only fires when is_found never became True.
Source
Thrown at homeassistant/components/broadlink/remote.py:393
self.hass,
f"Press and hold the '{command}' button.",
title="Sweep frequency",
notification_id="sweep_frequency",
)
try:
start_time = dt_util.utcnow()
while (dt_util.utcnow() - start_time) < LEARNING_TIMEOUT:
await asyncio.sleep(1)
is_found, frequency = await device.async_request(
device.api.check_frequency
)
if is_found:
_LOGGER.debug("Radiofrequency detected: %s MHz", frequency)
break
else:
await device.async_request(device.api.cancel_sweep_frequency)
raise TimeoutError(
"No radiofrequency found within "
f"{LEARNING_TIMEOUT.total_seconds()} seconds"
)
finally:
persistent_notification.async_dismiss(
self.hass, notification_id="sweep_frequency"
)
await asyncio.sleep(1)
try:
await device.async_request(device.api.find_rf_packet)
except (BroadlinkException, OSError) as err:
_LOGGER.debug("Failed to enter learning mode: %s", err)
raise
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Retry and hold the original remote right next to the Broadlink, pressing repeatedly throughout the whole sweep window.
- Verify the remote operates on 433/315 MHz — Broadlink cannot sweep 868 MHz or 2.4 GHz protocols.
- For rolling-code garage doors prefer the vendor's integration rather than learned codes.
- Keep other 433 transmitters quiet during learning to avoid locking onto the wrong signal.
Defensive patterns
Strategy: try-catch
Validate before calling
SUPPORTED_RF_RANGES = [(433_050_000, 434_790_000), (314_950_000, 315_250_000)]
def remote_band_supported(freq_hz: int) -> bool:
"""Cheap pre-check that learning can possibly succeed for this band."""
return any(lo <= freq_hz <= hi for lo, hi in SUPPORTED_RF_RANGES) Try / catch
try:
code = await remote._async_learn_rf_command(command)
except TimeoutError as err:
_LOGGER.warning("RF sweep timed out: %s", err)
# sweep already cancelled by the integration; instruct the user and retry once
raise HomeAssistantError("Hold the remote next to the device and keep pressing during the sweep") from err Prevention
- Keep pressing the original remote button throughout the entire sweep window, held close to the Broadlink.
- Confirm the remote uses 433/315 MHz before attempting RF learning.
- Silence other 433 MHz transmitters during learning to avoid locking the wrong frequency.
When it happens
Trigger: remote.learn_command with command_type rf where the original remote never transmits during the sweep window — user does not press the button, remote is 868/2.4 GHz (out of sweep range), or signal too weak for the Broadlink to lock a frequency.
Common situations: Learning rolling-code or non-433/315 remotes (garage openers on other bands), walking away during sweep, holding the remote too far away, depleted remote battery.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- No infrared code received within {LEARNING_TIMEOUT.total_sec
- frequency_not_supported
- transmit_failed
- No radiofrequency code received within {LEARNING_TIMEOUT.tot
- Failed to connect
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/c69a82441c569201.
Report an issue: GitHub.