From b4344a8de2df1fdaa7fc2b0d8689daa659a355f1 Mon Sep 17 00:00:00 2001 From: tdfountain <174762217+tdfountain@users.noreply.github.com> Date: Sat, 19 Apr 2025 16:50:22 -0700 Subject: [PATCH] Remove unused variable and import in NUT (#143294) Remove unused variable in validate_input --- homeassistant/components/nut/config_flow.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/nut/config_flow.py b/homeassistant/components/nut/config_flow.py index a69d898ff6c..eb13e4a168b 100644 --- a/homeassistant/components/nut/config_flow.py +++ b/homeassistant/components/nut/config_flow.py @@ -19,7 +19,6 @@ from homeassistant.const import ( CONF_PORT, CONF_USERNAME, ) -from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import AbortFlow from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo @@ -56,7 +55,7 @@ def _ups_schema(ups_list: dict[str, str]) -> vol.Schema: return vol.Schema({vol.Required(CONF_ALIAS): vol.In(ups_list)}) -async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str, Any]: +async def validate_input(data: dict[str, Any]) -> dict[str, Any]: """Validate the user input allows us to connect. Data has the keys from _base_schema with values provided by the user. @@ -303,7 +302,7 @@ class NutConfigFlow(ConfigFlow, domain=DOMAIN): info: dict[str, Any] = {} description_placeholders: dict[str, str] = {} try: - info = await validate_input(self.hass, config) + info = await validate_input(config) except NUTLoginError: errors[CONF_PASSWORD] = "invalid_auth" except NUTError as ex: