home-assistant/core · warning · ValueError
{self.entity_id} doesn't support sending RF commands
Error message
{self.entity_id} doesn't support sending RF commands What it means
ValueError('<entity_id> doesn't support sending RF commands') from the remote's send path: after extracting codes, if any first packet byte is 0xB2 or 0xD7 (RF packet markers) and the selected Broadlink device API lacks a sweep_frequency attribute, the device is deemed RF-incapable and the service aborts before transmitting anything.
Source
Thrown at homeassistant/components/broadlink/remote.py:244
)
return
if not self._storage_loaded:
await self._async_load_storage()
try:
code_list = self._extract_codes(commands, subdevice)
except ValueError as err:
_LOGGER.error("Failed to call %s: %s", service, err)
raise
rf_flags = {0xB2, 0xD7}
if not hasattr(device.api, "sweep_frequency") and any(
c[0] in rf_flags for codes in code_list for c in codes
):
err_msg = f"{self.entity_id} doesn't support sending RF commands"
_LOGGER.error("Failed to call %s: %s", service, err_msg)
raise ValueError(err_msg)
at_least_one_sent = False
for _, codes in product(range(repeat), code_list):
if at_least_one_sent:
await asyncio.sleep(delay)
if len(codes) > 1:
code = codes[self._flags[subdevice]]
else:
code = codes[0]
try:
await device.async_request(device.api.send_data, code)
# pylint: disable-next=home-assistant-action-swallowed-exception
except (BroadlinkException, OSError) as err:
_LOGGER.error("Error during %s: %s", service, err)
break
View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Send those commands through an RF-capable Broadlink (RM Pro, RM4 Pro) instead.
- If the target device really is RF-capable, update the broadlink package / HA — newer firmwares expose the API differently.
- Re-learn the commands as IR on this device if they were mislabeled RF.
- Split automations so RF commands target only entities backed by RF hardware.
Example fix
# before: IR-only entity, RF code target: entity_id: remote.broadlink_rm_mini3 data: device: socket command: RF_On # after: route to RF-capable entity target: entity_id: remote.broadlink_rm4_pro device: socket command: RF_On
Defensive patterns
Strategy: type-guard
Validate before calling
def device_supports_rf(device) -> bool:
"""Mirror the integration's capability check before sending."""
return hasattr(device.api, "sweep_frequency") Type guard
RF_PACKET_TYPES = {0xB2, 0xD7}
def is_rf_code_list(code_list: list[list[bytes]]) -> bool:
"""Narrow to code sets whose packets are RF-typed."""
return any(c[0] in RF_PACKET_TYPES for codes in code_list for c in codes) Try / catch
try:
await remote.async_send_command(commands, device=subdevice)
except ValueError as err:
if "doesn't support sending RF commands" in str(err):
_LOGGER.warning("Routing RF command to an RF-capable device instead")
await rf_capable_remote.async_send_command(commands, device=subdevice)
else:
raise Prevention
- Map RF commands only to RM Pro / RM4 Pro entities in automations.
- Check hasattr(device.api, 'sweep_frequency') in custom scripts before sending RF packets.
- Name entities by capability (e.g. remote.rm4_pro) to make routing mistakes obvious.
When it happens
Trigger: Sending learned RF codes (packet type byte 0xB2/0xD7) through an IR-only Broadlink model such as an RM mini 3 or SP/MP switch line — hardware with no RF radio. The hasattr(device.api, 'sweep_frequency') check fails.
Common situations: Codes learned on an RM Pro moved to an RM mini, buying IR-only models for 433 MHz sockets/doors, restoring automations from an RF-capable setup onto new IR-only hardware.
Related errors
- {self.entity_id} doesn't support learning RF commands
- You need to specify a device
- Command not found: {cmd!r}
- Invalid code: {code!r}
- No radiofrequency code received within {LEARNING_TIMEOUT.tot
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/8e17af64da5d7950.
Report an issue: GitHub.