{"record":{"id":"67c0f1b8344b99c5","repo":"home-assistant/core","slug":"device-not-found","errorCode":"device_not_found","errorMessage":"Could not find Avea device with address {address}: {reason}","messagePattern":"Could not find Avea device with address (.+?): (.+?)","errorType":"exception","errorClass":"ConfigEntryNotReady","httpStatus":null,"severity":"error","filePath":"homeassistant/components/avea/__init__.py","lineNumber":27,"sourceCode":")\nfrom homeassistant.config_entries import ConfigEntry\nfrom homeassistant.const import CONF_ADDRESS, Platform\nfrom homeassistant.core import HomeAssistant\nfrom homeassistant.exceptions import ConfigEntryNotReady\n\nfrom .const import DOMAIN\n\ntype AveaConfigEntry = ConfigEntry[avea.Bulb]\n\nPLATFORMS: list[Platform] = [Platform.LIGHT]\n\n\nasync def async_setup_entry(hass: HomeAssistant, entry: AveaConfigEntry) -> bool:\n    \"\"\"Set up Avea from a config entry.\"\"\"\n    address = entry.data[CONF_ADDRESS]\n    ble_device = async_ble_device_from_address(hass, address, connectable=True)\n    if not ble_device:\n        raise ConfigEntryNotReady(\n            translation_domain=DOMAIN,\n            translation_key=\"device_not_found\",\n            translation_placeholders={\n                \"address\": address,\n                \"reason\": async_address_reachability_diagnostics(\n                    hass,\n                    address.upper(),\n                    BluetoothReachabilityIntent.CONNECTION,\n                ),\n            },\n        )\n\n    entry.runtime_data = avea.Bulb(ble_device)\n    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)\n    return True\n\n\nasync def async_unload_entry(hass: HomeAssistant, entry: AveaConfigEntry) -> bool:","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/avea/__init__.py#L9-L45","documentation":"Raised as ConfigEntryNotReady (with translation_key device_not_found) by the Avea integration when async_ble_device_from_address() returns None — no connectable Bluetooth advertisement seen for the configured MAC address. The placeholders include address and a human-readable reachability diagnostic (from async_address_reachability_diagnostics). Setup retries automatically while the bulb remains undiscovered.","triggerScenarios":"async_setup_entry runs before the BLE scanner has ever seen the bulb: bulb powered off, out of range, using a random resolvable address, or Bluetooth adapter not ready. async_ble_device_from_address(hass, address, connectable=True) needs a recent advertisement cache entry.","commonSituations":"Bulb unplugged or dead; HA started before the BLE adapter was up; MAC address typo in config entry; bulb uses rotating MAC addresses so the stored address never matches; adapter on USB hub with poor reception.","solutions":["Power on the Avea bulb and bring it within range of the Home Assistant Bluetooth adapter, then let setup retry.","Verify the configured CONF_ADDRESS matches the bulb's current BLE MAC (check via the Bluetooth integration's discovered devices).","Ensure the Bluetooth integration and adapter are healthy (Settings > Devices > Bluetooth shows adapters).","If the bulb rotates its MAC, re-pair it so a fresh config entry with the current address is created."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from homeassistant.components.bluetooth import async_ble_device_from_address\n\ndef bulb_discovered(hass, address: str) -> bool:\n    return async_ble_device_from_address(hass, address.upper(), connectable=True) is not None\n","typeGuard":null,"tryCatchPattern":"from homeassistant.exceptions import ConfigEntryNotReady\n\ntry:\n    await async_setup_entry(hass, entry)\nexcept ConfigEntryNotReady as err:\n    # read translation placeholders: 'reason' explains why the address is unreachable\n    handle_bluetooth_retry(err)","preventionTips":["Power the device on before (re)installing BLE integrations — the scanner must see one advertisement first.","Use uppercase normalized MAC addresses everywhere.","Keep BLE devices away from 2.4GHz interference sources; check the Bluetooth adapter is healthy before setup."],"tags":["home-assistant","bluetooth","ble","config-entry","avea"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}