Skip to content

Commit

Permalink
Fix Nest ConfigEntry typing (home-assistant#134021)
Browse files Browse the repository at this point in the history
  • Loading branch information
allenporter authored Dec 26, 2024
1 parent 5172139 commit 3bfb670
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions homeassistant/components/nest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from homeassistant.components.camera import Image, img_util
from homeassistant.components.http import KEY_HASS_USER
from homeassistant.components.http.view import HomeAssistantView
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_BINARY_SENSORS,
CONF_CLIENT_ID,
Expand Down Expand Up @@ -252,12 +251,12 @@ def on_hass_stop(_: Event) -> None:
return True


async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
async def async_unload_entry(hass: HomeAssistant, entry: NestConfigEntry) -> bool:
"""Unload a config entry."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)


async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
async def async_remove_entry(hass: HomeAssistant, entry: NestConfigEntry) -> None:
"""Handle removal of pubsub subscriptions created during config flow."""
if (
DATA_SDM not in entry.data
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/nest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from google_nest_sdm.auth import AbstractAuth
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client, config_entry_oauth2_flow

Expand All @@ -24,6 +23,7 @@
OAUTH2_TOKEN,
SDM_SCOPES,
)
from .types import NestConfigEntry

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -102,7 +102,7 @@ async def async_get_creds(self) -> Credentials:


async def new_subscriber(
hass: HomeAssistant, entry: ConfigEntry
hass: HomeAssistant, entry: NestConfigEntry
) -> GoogleNestSubscriber | None:
"""Create a GoogleNestSubscriber."""
implementation = (
Expand Down

0 comments on commit 3bfb670

Please sign in to comment.