mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +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
|
from collections.abc import Mapping
|
||||||
import logging
|
import logging
|
||||||
from types import MappingProxyType
|
from types import MappingProxyType
|
||||||
from typing import Any
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
from awesomeversion import AwesomeVersion
|
from awesomeversion import AwesomeVersion
|
||||||
from pyenphase import AUTH_TOKEN_MIN_VERSION, Envoy, EnvoyError
|
from pyenphase import AUTH_TOKEN_MIN_VERSION, Envoy, EnvoyError
|
||||||
@ -311,6 +311,9 @@ class EnvoyOptionsFlowHandler(OptionsFlowWithConfigEntry):
|
|||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
return self.async_create_entry(title="", data=user_input)
|
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(
|
return self.async_show_form(
|
||||||
step_id="init",
|
step_id="init",
|
||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
@ -326,6 +329,6 @@ class EnvoyOptionsFlowHandler(OptionsFlowWithConfigEntry):
|
|||||||
),
|
),
|
||||||
description_placeholders={
|
description_placeholders={
|
||||||
CONF_SERIAL: self.config_entry.unique_id,
|
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