diff --git a/homeassistant/components/adguard/config_flow.py b/homeassistant/components/adguard/config_flow.py index 9afdc4e02b8..c7cb261d7c8 100644 --- a/homeassistant/components/adguard/config_flow.py +++ b/homeassistant/components/adguard/config_flow.py @@ -56,7 +56,6 @@ class AdGuardHomeFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="hassio_confirm", description_placeholders={"addon": self._hassio_discovery["addon"]}, - data_schema=vol.Schema({}), errors=errors or {}, ) diff --git a/homeassistant/components/almond/config_flow.py b/homeassistant/components/almond/config_flow.py index bc945025c24..dfbdae219ca 100644 --- a/homeassistant/components/almond/config_flow.py +++ b/homeassistant/components/almond/config_flow.py @@ -8,7 +8,6 @@ from typing import Any from aiohttp import ClientError import async_timeout from pyalmond import AlmondLocalAuth, WebAlmondAPI -import voluptuous as vol from yarl import URL from homeassistant import core, data_entry_flow @@ -122,5 +121,4 @@ class AlmondFlowHandler( return self.async_show_form( step_id="hassio_confirm", description_placeholders={"addon": data["addon"]}, - data_schema=vol.Schema({}), ) diff --git a/homeassistant/components/lyric/config_flow.py b/homeassistant/components/lyric/config_flow.py index 38341113206..698e7e19a26 100644 --- a/homeassistant/components/lyric/config_flow.py +++ b/homeassistant/components/lyric/config_flow.py @@ -1,8 +1,6 @@ """Config flow for Honeywell Lyric.""" import logging -import voluptuous as vol - from homeassistant.helpers import config_entry_oauth2_flow from .const import DOMAIN @@ -27,10 +25,7 @@ class OAuth2FlowHandler( async def async_step_reauth_confirm(self, user_input=None): """Dialog that informs the user that reauth is required.""" if user_input is None: - return self.async_show_form( - step_id="reauth_confirm", - data_schema=vol.Schema({}), - ) + return self.async_show_form(step_id="reauth_confirm") return await self.async_step_user() async def async_oauth_create_entry(self, data: dict) -> dict: diff --git a/homeassistant/components/moon/config_flow.py b/homeassistant/components/moon/config_flow.py index 1f7c5715f9e..abdd60c7b65 100644 --- a/homeassistant/components/moon/config_flow.py +++ b/homeassistant/components/moon/config_flow.py @@ -3,8 +3,6 @@ from __future__ import annotations from typing import Any -import voluptuous as vol - from homeassistant.config_entries import ConfigFlow from homeassistant.const import CONF_NAME from homeassistant.data_entry_flow import FlowResult @@ -30,7 +28,7 @@ class MoonConfigFlow(ConfigFlow, domain=DOMAIN): data={}, ) - return self.async_show_form(step_id="user", data_schema=vol.Schema({})) + return self.async_show_form(step_id="user") async def async_step_import(self, user_input: dict[str, Any]) -> FlowResult: """Handle import from configuration.yaml.""" diff --git a/homeassistant/components/neato/config_flow.py b/homeassistant/components/neato/config_flow.py index 07aea0a7e9c..15544371b2e 100644 --- a/homeassistant/components/neato/config_flow.py +++ b/homeassistant/components/neato/config_flow.py @@ -5,8 +5,6 @@ import logging from types import MappingProxyType from typing import Any -import voluptuous as vol - from homeassistant.config_entries import SOURCE_REAUTH from homeassistant.data_entry_flow import FlowResult from homeassistant.helpers import config_entry_oauth2_flow @@ -46,9 +44,7 @@ class OAuth2FlowHandler( ) -> FlowResult: """Confirm reauth upon migration of old entries.""" if user_input is None: - return self.async_show_form( - step_id="reauth_confirm", data_schema=vol.Schema({}) - ) + return self.async_show_form(step_id="reauth_confirm") return await self.async_step_user() async def async_oauth_create_entry(self, data: dict[str, Any]) -> FlowResult: diff --git a/homeassistant/components/nest/config_flow.py b/homeassistant/components/nest/config_flow.py index b257c7b51bb..aeebd48abb4 100644 --- a/homeassistant/components/nest/config_flow.py +++ b/homeassistant/components/nest/config_flow.py @@ -232,10 +232,7 @@ class NestFlowHandler( """Confirm reauth dialog.""" assert self.config_mode != ConfigMode.LEGACY, "Step only supported for SDM API" if user_input is None: - return self.async_show_form( - step_id="reauth_confirm", - data_schema=vol.Schema({}), - ) + return self.async_show_form(step_id="reauth_confirm") existing_entries = self._async_current_entries() if existing_entries: # Pick an existing auth implementation for Reauth if present. Note diff --git a/homeassistant/components/netatmo/config_flow.py b/homeassistant/components/netatmo/config_flow.py index ad8f75f5d45..bbd28e8398f 100644 --- a/homeassistant/components/netatmo/config_flow.py +++ b/homeassistant/components/netatmo/config_flow.py @@ -75,10 +75,7 @@ class NetatmoFlowHandler( ) -> FlowResult: """Dialog that informs the user that reauth is required.""" if user_input is None: - return self.async_show_form( - step_id="reauth_confirm", - data_schema=vol.Schema({}), - ) + return self.async_show_form(step_id="reauth_confirm") return await self.async_step_user() diff --git a/homeassistant/components/powerwall/config_flow.py b/homeassistant/components/powerwall/config_flow.py index 08e9f90df1b..836aa46e2a4 100644 --- a/homeassistant/components/powerwall/config_flow.py +++ b/homeassistant/components/powerwall/config_flow.py @@ -145,7 +145,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): } return self.async_show_form( step_id="confirm_discovery", - data_schema=vol.Schema({}), description_placeholders={ "name": self.title, "ip_address": self.ip_address, diff --git a/homeassistant/components/profiler/config_flow.py b/homeassistant/components/profiler/config_flow.py index b63246ce386..db3241bf1d3 100644 --- a/homeassistant/components/profiler/config_flow.py +++ b/homeassistant/components/profiler/config_flow.py @@ -1,6 +1,4 @@ """Config flow for Profiler integration.""" -import voluptuous as vol - from homeassistant import config_entries from .const import DEFAULT_NAME, DOMAIN @@ -19,4 +17,4 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): if user_input is not None: return self.async_create_entry(title=DEFAULT_NAME, data={}) - return self.async_show_form(step_id="user", data_schema=vol.Schema({})) + return self.async_show_form(step_id="user") diff --git a/homeassistant/components/rtsp_to_webrtc/config_flow.py b/homeassistant/components/rtsp_to_webrtc/config_flow.py index 32735f3e824..815c5e5db7b 100644 --- a/homeassistant/components/rtsp_to_webrtc/config_flow.py +++ b/homeassistant/components/rtsp_to_webrtc/config_flow.py @@ -97,7 +97,6 @@ class RTSPToWebRTCConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="hassio_confirm", description_placeholders={"addon": self._hassio_discovery["addon"]}, - data_schema=vol.Schema({}), errors=errors, ) diff --git a/homeassistant/components/sonarr/config_flow.py b/homeassistant/components/sonarr/config_flow.py index c9ef2d3ecc8..0bdcca6c033 100644 --- a/homeassistant/components/sonarr/config_flow.py +++ b/homeassistant/components/sonarr/config_flow.py @@ -76,7 +76,6 @@ class SonarrConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="reauth_confirm", description_placeholders={"url": self.entry.data[CONF_URL]}, - data_schema=vol.Schema({}), errors={}, ) diff --git a/homeassistant/components/spotify/config_flow.py b/homeassistant/components/spotify/config_flow.py index bd01fa64acb..e1780ff9d40 100644 --- a/homeassistant/components/spotify/config_flow.py +++ b/homeassistant/components/spotify/config_flow.py @@ -5,7 +5,6 @@ import logging from typing import Any from spotipy import Spotify -import voluptuous as vol from homeassistant.components import persistent_notification from homeassistant.config_entries import ConfigEntry @@ -83,7 +82,6 @@ class SpotifyFlowHandler( return self.async_show_form( step_id="reauth_confirm", description_placeholders={"account": self.reauth_entry.data["id"]}, - data_schema=vol.Schema({}), errors={}, ) diff --git a/homeassistant/components/velbus/config_flow.py b/homeassistant/components/velbus/config_flow.py index 189dc029ded..993146d375c 100644 --- a/homeassistant/components/velbus/config_flow.py +++ b/homeassistant/components/velbus/config_flow.py @@ -115,5 +115,4 @@ class VelbusConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="discovery_confirm", description_placeholders={CONF_NAME: self._title}, - data_schema=vol.Schema({}), ) diff --git a/homeassistant/components/vizio/config_flow.py b/homeassistant/components/vizio/config_flow.py index 019d016eb2a..8acc602dd36 100644 --- a/homeassistant/components/vizio/config_flow.py +++ b/homeassistant/components/vizio/config_flow.py @@ -454,7 +454,6 @@ class VizioConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): self._must_show_form = False return self.async_show_form( step_id=step_id, - data_schema=vol.Schema({}), description_placeholders={"access_token": self._data[CONF_ACCESS_TOKEN]}, ) diff --git a/homeassistant/components/vlc_telnet/config_flow.py b/homeassistant/components/vlc_telnet/config_flow.py index d714057e6f7..29508ad1120 100644 --- a/homeassistant/components/vlc_telnet/config_flow.py +++ b/homeassistant/components/vlc_telnet/config_flow.py @@ -165,7 +165,6 @@ class VLCTelnetConfigFlow(ConfigFlow, domain=DOMAIN): if user_input is None: return self.async_show_form( step_id="hassio_confirm", - data_schema=vol.Schema({}), description_placeholders={"addon": self.hassio_discovery["addon"]}, ) diff --git a/homeassistant/components/wiz/config_flow.py b/homeassistant/components/wiz/config_flow.py index 7d86502784c..04a0884059f 100644 --- a/homeassistant/components/wiz/config_flow.py +++ b/homeassistant/components/wiz/config_flow.py @@ -103,7 +103,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="discovery_confirm", description_placeholders=placeholders, - data_schema=vol.Schema({}), ) async def async_step_pick_device( diff --git a/homeassistant/components/xiaomi_miio/config_flow.py b/homeassistant/components/xiaomi_miio/config_flow.py index 04e2b58ad0f..9796cd22746 100644 --- a/homeassistant/components/xiaomi_miio/config_flow.py +++ b/homeassistant/components/xiaomi_miio/config_flow.py @@ -136,9 +136,7 @@ class XiaomiMiioFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): """Dialog that informs the user that reauth is required.""" if user_input is not None: return await self.async_step_cloud() - return self.async_show_form( - step_id="reauth_confirm", data_schema=vol.Schema({}) - ) + return self.async_show_form(step_id="reauth_confirm") async def async_step_import(self, conf: dict): """Import a configuration from config.yaml.""" diff --git a/homeassistant/components/zha/config_flow.py b/homeassistant/components/zha/config_flow.py index 4d6b22a82e5..f8f696c56e3 100644 --- a/homeassistant/components/zha/config_flow.py +++ b/homeassistant/components/zha/config_flow.py @@ -156,7 +156,6 @@ class ZhaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="confirm", description_placeholders={CONF_NAME: self._title}, - data_schema=vol.Schema({}), ) async def async_step_zeroconf( diff --git a/homeassistant/components/zwave_js/config_flow.py b/homeassistant/components/zwave_js/config_flow.py index 32f406d7476..186695d8fbb 100644 --- a/homeassistant/components/zwave_js/config_flow.py +++ b/homeassistant/components/zwave_js/config_flow.py @@ -385,7 +385,6 @@ class ConfigFlow(BaseZwaveJSFlow, config_entries.ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="usb_confirm", description_placeholders={CONF_NAME: self._title}, - data_schema=vol.Schema({}), ) self._usb_discovery = True diff --git a/homeassistant/data_entry_flow.py b/homeassistant/data_entry_flow.py index b69cf44dc6c..46311af94e0 100644 --- a/homeassistant/data_entry_flow.py +++ b/homeassistant/data_entry_flow.py @@ -69,7 +69,7 @@ class FlowResult(TypedDict, total=False): title: str data: Mapping[str, Any] step_id: str - data_schema: vol.Schema + data_schema: vol.Schema | None extra: str required: bool errors: dict[str, str] | None @@ -408,7 +408,7 @@ class FlowHandler: self, *, step_id: str, - data_schema: vol.Schema = None, + data_schema: vol.Schema | None = None, errors: dict[str, str] | None = None, description_placeholders: dict[str, Any] | None = None, last_step: bool | None = None, diff --git a/tests/components/config/test_config_entries.py b/tests/components/config/test_config_entries.py index 06b9f1ae7f6..a24e0961f9c 100644 --- a/tests/components/config/test_config_entries.py +++ b/tests/components/config/test_config_entries.py @@ -1017,7 +1017,7 @@ async def test_ignore_flow(hass, hass_ws_client): async def async_step_user(self, user_input=None): await self.async_set_unique_id("mock-unique-id") - return self.async_show_form(step_id="account", data_schema=vol.Schema({})) + return self.async_show_form(step_id="account") ws_client = await hass_ws_client(hass)