diff --git a/homeassistant/components/smhi/__init__.py b/homeassistant/components/smhi/__init__.py index 70ee0aaa386..418c9ac32f1 100644 --- a/homeassistant/components/smhi/__init__.py +++ b/homeassistant/components/smhi/__init__.py @@ -2,12 +2,6 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant -# Have to import for config_flow to work even if they are not used here -from .config_flow import smhi_locations # noqa: F401 -from .const import DOMAIN # noqa: F401 - -DEFAULT_NAME = "smhi" - PLATFORMS = ["weather"] diff --git a/homeassistant/components/smhi/config_flow.py b/homeassistant/components/smhi/config_flow.py index 5c3572dd2fd..16be0c9fda4 100644 --- a/homeassistant/components/smhi/config_flow.py +++ b/homeassistant/components/smhi/config_flow.py @@ -21,7 +21,7 @@ from .const import DOMAIN, HOME_LOCATION_NAME def smhi_locations(hass: HomeAssistant) -> set[str]: """Return configurations of SMHI component.""" return { - (slugify(entry.data[CONF_NAME])) + slugify(entry.data[CONF_NAME]) for entry in hass.config_entries.async_entries(DOMAIN) } diff --git a/homeassistant/components/smhi/const.py b/homeassistant/components/smhi/const.py index 03b583b77ec..26eb506fb67 100644 --- a/homeassistant/components/smhi/const.py +++ b/homeassistant/components/smhi/const.py @@ -12,4 +12,3 @@ DOMAIN = "smhi" HOME_LOCATION_NAME = "Home" ENTITY_ID_SENSOR_FORMAT = WEATHER_DOMAIN + ".smhi_{}" -ENTITY_ID_SENSOR_FORMAT_HOME = ENTITY_ID_SENSOR_FORMAT.format(HOME_LOCATION_NAME)