Coverage for custom_components/dev_shell_server/config_flow.py: 60%

13 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-10-03 09:02 +0000

1"""Config flow for Dev Shell: a single, option-less entry added from the UI or imported from YAML.""" 

2 

3from __future__ import annotations 

4 

5from typing import Any 

6 

7from homeassistant.config_entries import ConfigFlow, ConfigFlowResult 

8 

9from .const import DOMAIN 

10 

11TITLE = "Developer Shell" 

12 

13 

14class DevShellConfigFlow(ConfigFlow, domain=DOMAIN): 

15 VERSION = 1 

16 

17 async def async_step_user( 

18 self, user_input: dict[str, Any] | None = None 

19 ) -> ConfigFlowResult: 

20 if user_input is not None: 

21 return self.async_create_entry(title=TITLE, data={}) 

22 return self.async_show_form(step_id="user") 

23 

24 async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: 

25 return self.async_create_entry(title=TITLE, data={})