diff --git a/homeassistant/components/flo/config_flow.py b/homeassistant/components/flo/config_flow.py index 038fc33777a..306ec945a3e 100644 --- a/homeassistant/components/flo/config_flow.py +++ b/homeassistant/components/flo/config_flow.py @@ -9,7 +9,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession from .const import DOMAIN, LOGGER -DATA_SCHEMA = vol.Schema({"username": str, "password": str}) +DATA_SCHEMA = vol.Schema({vol.Required("username"): str, vol.Required("password"): str}) async def validate_input(hass: core.HomeAssistant, data): diff --git a/homeassistant/components/goalzero/config_flow.py b/homeassistant/components/goalzero/config_flow.py index 575ff2ba350..cea47c967a8 100644 --- a/homeassistant/components/goalzero/config_flow.py +++ b/homeassistant/components/goalzero/config_flow.py @@ -18,7 +18,7 @@ from .const import DEFAULT_NAME, DOMAIN _LOGGER = logging.getLogger(__name__) -DATA_SCHEMA = vol.Schema({"host": str, "name": str}) +DATA_SCHEMA = vol.Schema({vol.Required("host"): str, vol.Required("name"): str}) class GoalZeroFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/mutesync/config_flow.py b/homeassistant/components/mutesync/config_flow.py index e4964d552b0..99412ed1795 100644 --- a/homeassistant/components/mutesync/config_flow.py +++ b/homeassistant/components/mutesync/config_flow.py @@ -16,7 +16,7 @@ from homeassistant.exceptions import HomeAssistantError from .const import DOMAIN -STEP_USER_DATA_SCHEMA = vol.Schema({"host": str}) +STEP_USER_DATA_SCHEMA = vol.Schema({vol.Required("host"): str}) async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str, Any]: diff --git a/homeassistant/components/ring/config_flow.py b/homeassistant/components/ring/config_flow.py index d4cc6796bf1..cca0c231d96 100644 --- a/homeassistant/components/ring/config_flow.py +++ b/homeassistant/components/ring/config_flow.py @@ -64,7 +64,9 @@ class RingConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="user", - data_schema=vol.Schema({"username": str, "password": str}), + data_schema=vol.Schema( + {vol.Required("username"): str, vol.Required("password"): str} + ), errors=errors, ) @@ -75,7 +77,7 @@ class RingConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="2fa", - data_schema=vol.Schema({"2fa": str}), + data_schema=vol.Schema({vol.Required("2fa"): str}), ) diff --git a/homeassistant/components/risco/config_flow.py b/homeassistant/components/risco/config_flow.py index 0bc9c49707a..c20aa2af287 100644 --- a/homeassistant/components/risco/config_flow.py +++ b/homeassistant/components/risco/config_flow.py @@ -30,7 +30,13 @@ from .const import ( _LOGGER = logging.getLogger(__name__) -DATA_SCHEMA = vol.Schema({CONF_USERNAME: str, CONF_PASSWORD: str, CONF_PIN: str}) +DATA_SCHEMA = vol.Schema( + { + vol.Required(CONF_USERNAME): str, + vol.Required(CONF_PASSWORD): str, + vol.Required(CONF_PIN): str, + } +) HA_STATES = [ STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, diff --git a/homeassistant/components/roon/config_flow.py b/homeassistant/components/roon/config_flow.py index 799d50bdaab..31391a0ff36 100644 --- a/homeassistant/components/roon/config_flow.py +++ b/homeassistant/components/roon/config_flow.py @@ -18,7 +18,7 @@ from .const import ( _LOGGER = logging.getLogger(__name__) -DATA_SCHEMA = vol.Schema({"host": str}) +DATA_SCHEMA = vol.Schema({vol.Required("host"): str}) TIMEOUT = 120 diff --git a/homeassistant/components/ruckus_unleashed/config_flow.py b/homeassistant/components/ruckus_unleashed/config_flow.py index 463c7b1d550..7d34e620a13 100644 --- a/homeassistant/components/ruckus_unleashed/config_flow.py +++ b/homeassistant/components/ruckus_unleashed/config_flow.py @@ -12,7 +12,13 @@ from .const import API_SERIAL, API_SYSTEM_OVERVIEW, DOMAIN _LOGGER = logging.getLogger(__package__) -DATA_SCHEMA = vol.Schema({"host": str, "username": str, "password": str}) +DATA_SCHEMA = vol.Schema( + { + vol.Required("host"): str, + vol.Required("username"): str, + vol.Required("password"): str, + } +) def validate_input(hass: core.HomeAssistant, data): diff --git a/script/scaffold/templates/config_flow/integration/config_flow.py b/script/scaffold/templates/config_flow/integration/config_flow.py index f88390599e7..cf6dfd9cc20 100644 --- a/script/scaffold/templates/config_flow/integration/config_flow.py +++ b/script/scaffold/templates/config_flow/integration/config_flow.py @@ -16,7 +16,13 @@ from .const import DOMAIN _LOGGER = logging.getLogger(__name__) # TODO adjust the data schema to the data that you need -STEP_USER_DATA_SCHEMA = vol.Schema({"host": str, "username": str, "password": str}) +STEP_USER_DATA_SCHEMA = vol.Schema( + { + vol.Required("host"): str, + vol.Required("username"): str, + vol.Required("password"): str, + } +) class PlaceholderHub: