Add type hints for config entry update listeners (#65412)

This commit is contained in:
epenet 2022-02-02 10:36:04 +01:00 committed by GitHub
parent 627be81531
commit a63e5c7ded
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 47 additions and 39 deletions

View file

@ -26,6 +26,7 @@ from aiounifi.events import (
from aiounifi.websocket import STATE_DISCONNECTED, STATE_RUNNING
import async_timeout
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
@ -34,7 +35,7 @@ from homeassistant.const import (
CONF_VERIFY_SSL,
Platform,
)
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import aiohttp_client, entity_registry as er
from homeassistant.helpers.dispatcher import async_dispatcher_send
@ -397,7 +398,9 @@ class UniFiController:
del self._heartbeat_time[unique_id]
@staticmethod
async def async_config_entry_updated(hass, config_entry) -> None:
async def async_config_entry_updated(
hass: HomeAssistant, config_entry: ConfigEntry
) -> None:
"""Handle signals of config entry being updated.
If config entry is updated due to reauth flow