1 """The iBeacon tracker integration."""
3 from __future__
import annotations
10 from .const
import DOMAIN, PLATFORMS
11 from .coordinator
import IBeaconCoordinator
13 type IBeaconConfigEntry = ConfigEntry[IBeaconCoordinator]
17 """Set up Bluetooth LE Tracker from a config entry."""
19 hass, entry, dr.async_get(hass)
21 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
22 await coordinator.async_start()
27 """Unload a config entry."""
28 return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
32 hass: HomeAssistant, config_entry: IBeaconConfigEntry, device_entry: DeviceEntry
34 """Remove iBeacon config entry from a device."""
35 coordinator = config_entry.runtime_data
38 for identifier
in device_entry.identifiers
39 if identifier[0] == DOMAIN
and coordinator.async_device_id_seen(identifier[1])
bool async_setup_entry(HomeAssistant hass, IBeaconConfigEntry entry)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_remove_config_entry_device(HomeAssistant hass, IBeaconConfigEntry config_entry, DeviceEntry device_entry)