Skip to content

Commit

Permalink
Fix async_forward_entry_setup warning
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkshireIoT committed Jul 7, 2024
1 parent 884efb2 commit bc83dbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/google_fit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit bc83dbc

Please sign in to comment.