mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Fix Nest ConfigEntry typing (#134021)
This commit is contained in:
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.camera import Image, img_util
|
||||||
from homeassistant.components.http import KEY_HASS_USER
|
from homeassistant.components.http import KEY_HASS_USER
|
||||||
from homeassistant.components.http.view import HomeAssistantView
|
from homeassistant.components.http.view import HomeAssistantView
|
||||||
from homeassistant.config_entries import ConfigEntry
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_BINARY_SENSORS,
|
CONF_BINARY_SENSORS,
|
||||||
CONF_CLIENT_ID,
|
CONF_CLIENT_ID,
|
||||||
@ -252,12 +251,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: NestConfigEntry) -> bool
|
|||||||
return True
|
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."""
|
"""Unload a config entry."""
|
||||||
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
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."""
|
"""Handle removal of pubsub subscriptions created during config flow."""
|
||||||
if (
|
if (
|
||||||
DATA_SDM not in entry.data
|
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.auth import AbstractAuth
|
||||||
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber
|
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import aiohttp_client, config_entry_oauth2_flow
|
from homeassistant.helpers import aiohttp_client, config_entry_oauth2_flow
|
||||||
|
|
||||||
@ -24,6 +23,7 @@ from .const import (
|
|||||||
OAUTH2_TOKEN,
|
OAUTH2_TOKEN,
|
||||||
SDM_SCOPES,
|
SDM_SCOPES,
|
||||||
)
|
)
|
||||||
|
from .types import NestConfigEntry
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ class AccessTokenAuthImpl(AbstractAuth):
|
|||||||
|
|
||||||
|
|
||||||
async def new_subscriber(
|
async def new_subscriber(
|
||||||
hass: HomeAssistant, entry: ConfigEntry
|
hass: HomeAssistant, entry: NestConfigEntry
|
||||||
) -> GoogleNestSubscriber | None:
|
) -> GoogleNestSubscriber | None:
|
||||||
"""Create a GoogleNestSubscriber."""
|
"""Create a GoogleNestSubscriber."""
|
||||||
implementation = (
|
implementation = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user