|
6 | 6 |
|
7 | 7 | import voluptuous as vol |
8 | 8 | from homeassistant import config_entries |
9 | | -from homeassistant.core import callback |
10 | 9 |
|
11 | 10 | from .const import ( |
12 | | - CONF_LOG_LEVEL, |
13 | | - DEFAULT_LOG_LEVEL, |
14 | 11 | DEFAULT_TITLE, |
15 | 12 | DOMAIN, |
16 | | - LOG_LEVEL_OPTIONS, |
17 | 13 | ) |
18 | 14 |
|
19 | 15 | if TYPE_CHECKING: |
@@ -41,40 +37,3 @@ async def async_step_user( |
41 | 37 | title=DEFAULT_TITLE, |
42 | 38 | data={}, |
43 | 39 | ) |
44 | | - |
45 | | - @staticmethod |
46 | | - @callback |
47 | | - def async_get_options_flow( |
48 | | - config_entry: ConfigEntry, |
49 | | - ) -> config_entries.OptionsFlow: |
50 | | - """Get the options flow for this handler.""" |
51 | | - return OptionsFlowHandler(config_entry) |
52 | | - |
53 | | - |
54 | | -class OptionsFlowHandler(config_entries.OptionsFlow): |
55 | | - """Handle Maint options.""" |
56 | | - |
57 | | - def __init__(self, config_entry: ConfigEntry) -> None: |
58 | | - """Initialize options flow.""" |
59 | | - self.config_entry = config_entry |
60 | | - |
61 | | - async def async_step_init( |
62 | | - self, user_input: Mapping[str, Any] | None = None |
63 | | - ) -> config_entries.ConfigFlowResult: |
64 | | - """Manage the Maint options.""" |
65 | | - if user_input is not None: |
66 | | - return self.async_create_entry(title="", data=user_input) |
67 | | - |
68 | | - current_log_level = self.config_entry.options.get( |
69 | | - CONF_LOG_LEVEL, DEFAULT_LOG_LEVEL |
70 | | - ) |
71 | | - return self.async_show_form( |
72 | | - step_id="init", |
73 | | - data_schema=vol.Schema( |
74 | | - { |
75 | | - vol.Optional(CONF_LOG_LEVEL, default=current_log_level): vol.In( |
76 | | - LOG_LEVEL_OPTIONS |
77 | | - ), |
78 | | - } |
79 | | - ), |
80 | | - ) |
0 commit comments