From bc83dbc0272c4ae1b647eca1a390e7f080c4a65c Mon Sep 17 00:00:00 2001 From: YorkshireIoT <55233103+YorkshireIoT@users.noreply.github.com> Date: Sun, 7 Jul 2024 15:10:35 +0000 Subject: [PATCH] Fix async_forward_entry_setup warning --- custom_components/google_fit/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/google_fit/__init__.py b/custom_components/google_fit/__init__.py index 1c2a922..b54359b 100644 --- a/custom_components/google_fit/__init__.py +++ b/custom_components/google_fit/__init__.py @@ -20,7 +20,7 @@ from .api import AsyncConfigEntryAuth, LOGGER from .const import DOMAIN -PLATFORM = Platform.SENSOR +PLATFORMS = [Platform.SENSOR] async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: @@ -53,7 +53,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: "coordinator": coordinator, } - await hass.config_entries.async_forward_entry_setup(entry, PLATFORM) + await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) entry.async_on_unload(entry.add_update_listener(update_listener)) # Attempt to retrieve values immediately, not waiting for first @@ -72,7 +72,7 @@ async def update_listener(hass, entry) -> None: async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Handle removal of an entry.""" - if unloaded := await hass.config_entries.async_unload_platforms(entry, [PLATFORM]): + if unloaded := await hass.config_entries.async_unload_platforms(entry, PLATFORMS): hass.data[DOMAIN].pop(entry.entry_id) return unloaded