mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Use ShellyConfigEntry type in Shelly config flow (#141103)
Use ShellyConfigEntry type in async_get_options_flow
This commit is contained in:
parent
ffd5c003cb
commit
c08cbf3763
@ -22,12 +22,7 @@ from aioshelly.exceptions import (
|
||||
from aioshelly.rpc_device import RpcDevice
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import (
|
||||
ConfigEntry,
|
||||
ConfigFlow,
|
||||
ConfigFlowResult,
|
||||
OptionsFlow,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult, OptionsFlow
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
CONF_MAC,
|
||||
@ -49,7 +44,7 @@ from .const import (
|
||||
LOGGER,
|
||||
BLEScannerMode,
|
||||
)
|
||||
from .coordinator import async_reconnect_soon
|
||||
from .coordinator import ShellyConfigEntry, async_reconnect_soon
|
||||
from .utils import (
|
||||
get_block_device_sleep_period,
|
||||
get_coap_context,
|
||||
@ -458,13 +453,13 @@ class ShellyConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
@staticmethod
|
||||
@callback
|
||||
def async_get_options_flow(config_entry: ConfigEntry) -> OptionsFlowHandler:
|
||||
def async_get_options_flow(config_entry: ShellyConfigEntry) -> OptionsFlowHandler:
|
||||
"""Get the options flow for this handler."""
|
||||
return OptionsFlowHandler()
|
||||
|
||||
@classmethod
|
||||
@callback
|
||||
def async_supports_options_flow(cls, config_entry: ConfigEntry) -> bool:
|
||||
def async_supports_options_flow(cls, config_entry: ShellyConfigEntry) -> bool:
|
||||
"""Return options flow support for this handler."""
|
||||
return (
|
||||
get_device_entry_gen(config_entry) in RPC_GENERATIONS
|
||||
|
Loading…
x
Reference in New Issue
Block a user