From 1a1770efbb7aa76c56a830f58c970c8ff8d82d1a Mon Sep 17 00:00:00 2001 From: G Johansson Date: Wed, 21 Oct 2026 09:29:43 +0200 Subject: [PATCH] Return None from config entry methods in OKOK Scale (#187735) Co-authored-by: Claude Opus 5.5 --- homeassistant/components/okok_scale/__init__.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/okok_scale/__init__.py b/homeassistant/components/okok_scale/__init__.py index b49cbc4b8491..0a0a21292fa0 100644 --- a/homeassistant/components/okok_scale/__init__.py +++ b/homeassistant/components/okok_scale/__init__.py @@ -26,7 +26,7 @@ _LOGGER = logging.getLogger(__name__) type OKOKScaleConfigEntry = ConfigEntry[ActiveBluetoothProcessorCoordinator] -async def async_setup_entry(hass: HomeAssistant, entry: OKOKScaleConfigEntry) -> bool: +async def async_setup_entry(hass: HomeAssistant, entry: OKOKScaleConfigEntry) -> None: """Set up OKOK Scale device from a config entry.""" address = entry.unique_id assert address is not None @@ -89,9 +89,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: OKOKScaleConfigEntry) -> # Only start after all platforms have had a chance to subscribe entry.async_on_unload(coordinator.async_start()) - return True - -async def async_unload_entry(hass: HomeAssistant, entry: OKOKScaleConfigEntry) -> bool: +async def async_unload_entry(hass: HomeAssistant, entry: OKOKScaleConfigEntry) -> None: """Unload a config entry.""" - return await hass.config_entries.async_unload_platforms(entry, PLATFORMS) + await hass.config_entries.async_unload_platforms_or_raise(entry, PLATFORMS)