mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Adjust type hints in enphase_envoy config_flow (#127106)
This commit is contained in:
parent
4e157c2999
commit
454fb30759
@ -5,7 +5,7 @@ from __future__ import annotations
|
||||
from collections.abc import Mapping
|
||||
import logging
|
||||
from types import MappingProxyType
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from awesomeversion import AwesomeVersion
|
||||
from pyenphase import AUTH_TOKEN_MIN_VERSION, Envoy, EnvoyError
|
||||
@ -311,6 +311,9 @@ class EnvoyOptionsFlowHandler(OptionsFlowWithConfigEntry):
|
||||
if user_input is not None:
|
||||
return self.async_create_entry(title="", data=user_input)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
assert self.config_entry.unique_id is not None
|
||||
|
||||
return self.async_show_form(
|
||||
step_id="init",
|
||||
data_schema=vol.Schema(
|
||||
@ -326,6 +329,6 @@ class EnvoyOptionsFlowHandler(OptionsFlowWithConfigEntry):
|
||||
),
|
||||
description_placeholders={
|
||||
CONF_SERIAL: self.config_entry.unique_id,
|
||||
CONF_HOST: self.config_entry.data.get("host"),
|
||||
CONF_HOST: self.config_entry.data[CONF_HOST],
|
||||
},
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user