1 """The Govee Bluetooth BLE integration."""
3 from __future__
import annotations
5 from functools
import partial
8 from govee_ble
import GoveeBluetoothDeviceData
14 from .coordinator
import (
15 GoveeBLEBluetoothProcessorCoordinator,
20 PLATFORMS: list[Platform] = [Platform.BINARY_SENSOR, Platform.EVENT, Platform.SENSOR]
22 _LOGGER = logging.getLogger(__name__)
26 """Set up Govee BLE device from a config entry."""
27 address = entry.unique_id
28 assert address
is not None
29 data = GoveeBluetoothDeviceData()
34 mode=BluetoothScanningMode.ACTIVE,
35 update_method=partial(process_service_info, hass, entry),
39 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
41 entry.async_on_unload(coordinator.async_start())
46 """Unload a config entry."""
47 return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
bool async_unload_entry(HomeAssistant hass, GoveeBLEConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, GoveeBLEConfigEntry entry)