Skip to content

Commit

Permalink
Merge pull request #285 from YorkshireIoT/279-warning-detected-code-t…
Browse files Browse the repository at this point in the history
…hat-calls-async_forward_entry_setup

Fix async_forward_entry_setup warning
  • Loading branch information
YorkshireIoT authored Jul 7, 2024
2 parents 884efb2 + f5106a5 commit 82c76d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Google Fit",
"filename": "google_fit.zip",
"hide_default_branch": true,
"homeassistant": "2022.3.0",
"homeassistant": "2024.1.0",
"render_readme": true,
"zip_release": true
}

0 comments on commit 82c76d3

Please sign in to comment.