{"record":{"id":"3cfe26404f607f73","repo":"home-assistant/core","slug":"send-command-failed","errorCode":null,"errorMessage":"send_command_failed","messagePattern":"send_command_failed","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/broadlink/infrared.py","lineNumber":64,"sourceCode":"class BroadlinkInfraredEntity(BroadlinkEntity, InfraredEmitterEntity):\n    \"\"\"Broadlink infrared emitter entity.\"\"\"\n\n    _attr_has_entity_name = True\n    _attr_translation_key = \"infrared_emitter\"\n\n    def __init__(self, device: BroadlinkDevice) -> None:\n        \"\"\"Initialize the entity.\"\"\"\n        super().__init__(device)\n        self._attr_unique_id = f\"{device.unique_id}-emitter\"\n\n    @override\n    async def async_send_command(self, command: InfraredCommand) -> None:\n        \"\"\"Send an IR command via the Broadlink device.\"\"\"\n        packet = _timings_to_broadlink_packet(command.get_raw_timings())\n        try:\n            await self._device.async_request(self._device.api.send_data, packet)\n        except (BroadlinkException, OSError) as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"send_command_failed\",\n                translation_placeholders={\"error\": str(err)},\n            ) from err\n","sourceCodeStart":46,"sourceCodeEnd":69,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/broadlink/infrared.py#L46-L69","documentation":"HomeAssistantError with key send_command_failed, raised by the Broadlink IR remote entity's async_send_command (the send_ir_code / remote.send_command path) when self._device.api.send_data raises BroadlinkException or OSError. The placeholder 'error' carries the library error text. The raw timings have already been encoded into a Broadlink packet at this point, so failures are transport/device-level.","triggerScenarios":"Calling remote.send_command (or the infrared emitter platform) on a Broadlink IR device while send_data fails: device offline, auth state lost after reboot, network error, device returning an error status.","commonSituations":"Device IP changed since setup, device rebooted and dropped its auth session (needs re-setup), automation firing while Wi-Fi is down, sending very long timing arrays the device rejects.","solutions":["Confirm the device is online (ping / HA device page) and retry the command.","Reload the Broadlink integration so the connection and auth are re-established.","Fix stale IP: set DHCP reservation or use the reconfigure flow.","Check the 'error' placeholder text in the UI message for the underlying BroadlinkException reason."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    await remote.async_send_command(command)\nexcept HomeAssistantError as err:\n    if err.translation_key == \"send_command_failed\":\n        raise HomeAssistantErrorRetryLater from err  # device transiently unreachable\n    raise","preventionTips":["Monitor the Broadlink device availability entity and gate IR automations on it.","Keep device IPs static so connections do not go stale.","Reload the integration after device reboots or long outages."],"tags":["home-assistant","broadlink","infrared","network"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}