Adjust config_entry UpdateListenerType signature (#65410)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-02-02 18:56:34 +01:00 committed by GitHub
parent 81ad56b8ad
commit 494ef2f9b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
return True return True
async def _update_listener(hass: HomeAssistant, entry: ConfigEntry): async def _update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Handle options update.""" """Handle options update."""
_LOGGER.debug("AlarmDecoder options updated: %s", entry.as_dict()["options"]) _LOGGER.debug("AlarmDecoder options updated: %s", entry.as_dict()["options"])
await hass.config_entries.async_reload(entry.entry_id) await hass.config_entries.async_reload(entry.entry_id)

View File

@ -2,7 +2,7 @@
from __future__ import annotations from __future__ import annotations
import asyncio import asyncio
from collections.abc import Callable, Iterable, Mapping from collections.abc import Awaitable, Callable, Iterable, Mapping
from contextvars import ContextVar from contextvars import ContextVar
import dataclasses import dataclasses
from enum import Enum from enum import Enum
@ -159,7 +159,7 @@ class OperationNotAllowed(ConfigError):
"""Raised when a config entry operation is not allowed.""" """Raised when a config entry operation is not allowed."""
UpdateListenerType = Callable[[HomeAssistant, "ConfigEntry"], Any] UpdateListenerType = Callable[[HomeAssistant, "ConfigEntry"], Awaitable[None]]
class ConfigEntry: class ConfigEntry: