{"record":{"id":"8e17af64da5d7950","repo":"home-assistant/core","slug":"self-entity-id-doesn-t-support-sending-rf-comman","errorCode":null,"errorMessage":"{self.entity_id} doesn't support sending RF commands","messagePattern":"(.+?) doesn't support sending RF commands","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"homeassistant/components/broadlink/remote.py","lineNumber":244,"sourceCode":"            )\n            return\n\n        if not self._storage_loaded:\n            await self._async_load_storage()\n\n        try:\n            code_list = self._extract_codes(commands, subdevice)\n        except ValueError as err:\n            _LOGGER.error(\"Failed to call %s: %s\", service, err)\n            raise\n\n        rf_flags = {0xB2, 0xD7}\n        if not hasattr(device.api, \"sweep_frequency\") and any(\n            c[0] in rf_flags for codes in code_list for c in codes\n        ):\n            err_msg = f\"{self.entity_id} doesn't support sending RF commands\"\n            _LOGGER.error(\"Failed to call %s: %s\", service, err_msg)\n            raise ValueError(err_msg)\n\n        at_least_one_sent = False\n        for _, codes in product(range(repeat), code_list):\n            if at_least_one_sent:\n                await asyncio.sleep(delay)\n\n            if len(codes) > 1:\n                code = codes[self._flags[subdevice]]\n            else:\n                code = codes[0]\n\n            try:\n                await device.async_request(device.api.send_data, code)\n            # pylint: disable-next=home-assistant-action-swallowed-exception\n            except (BroadlinkException, OSError) as err:\n                _LOGGER.error(\"Error during %s: %s\", service, err)\n                break\n","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/broadlink/remote.py#L226-L262","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before: IR-only entity, RF code\ntarget:\n  entity_id: remote.broadlink_rm_mini3\ndata:\n  device: socket\n  command: RF_On\n\n# after: route to RF-capable entity\ntarget:\n  entity_id: remote.broadlink_rm4_pro\n  device: socket\n  command: RF_On","handlingStrategy":"type-guard","validationCode":"def device_supports_rf(device) -> bool:\n    \"\"\"Mirror the integration's capability check before sending.\"\"\"\n    return hasattr(device.api, \"sweep_frequency\")","typeGuard":"RF_PACKET_TYPES = {0xB2, 0xD7}\n\ndef is_rf_code_list(code_list: list[list[bytes]]) -> bool:\n    \"\"\"Narrow to code sets whose packets are RF-typed.\"\"\"\n    return any(c[0] in RF_PACKET_TYPES for codes in code_list for c in codes)","tryCatchPattern":"try:\n    await remote.async_send_command(commands, device=subdevice)\nexcept ValueError as err:\n    if \"doesn't support sending RF commands\" in str(err):\n        _LOGGER.warning(\"Routing RF command to an RF-capable device instead\")\n        await rf_capable_remote.async_send_command(commands, device=subdevice)\n    else:\n        raise","preventionTips":["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."],"tags":["home-assistant","broadlink","remote","hardware-limit"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}