Fix Nest ConfigEntry typing (#134021)
parent
5172139579
commit
3bfb6707e9
|
@ -27,7 +27,6 @@ from homeassistant.auth.permissions.const import POLICY_READ
|
|||
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,
|
||||
|
@ -252,12 +251,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: NestConfigEntry) -> bool
|
|||
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
|
||||
|
|
|
@ -12,7 +12,6 @@ from google_nest_sdm.admin_client import PUBSUB_API_HOST, AdminClient
|
|||
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
|
||||
|
||||
|
@ -24,6 +23,7 @@ from .const import (
|
|||
OAUTH2_TOKEN,
|
||||
SDM_SCOPES,
|
||||
)
|
||||
from .types import NestConfigEntry
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -102,7 +102,7 @@ class AccessTokenAuthImpl(AbstractAuth):
|
|||
|
||||
|
||||
async def new_subscriber(
|
||||
hass: HomeAssistant, entry: ConfigEntry
|
||||
hass: HomeAssistant, entry: NestConfigEntry
|
||||
) -> GoogleNestSubscriber | None:
|
||||
"""Create a GoogleNestSubscriber."""
|
||||
implementation = (
|
||||
|
|
Loading…
Reference in New Issue