diff --git a/homeassistant/components/zone/__init__.py b/homeassistant/components/zone/__init__.py index 6ae62be3eb9..357d4eac172 100644 --- a/homeassistant/components/zone/__init__.py +++ b/homeassistant/components/zone/__init__.py @@ -4,29 +4,28 @@ from typing import Set, cast import voluptuous as vol -from homeassistant.core import callback, State -from homeassistant.loader import bind_hass -import homeassistant.helpers.config_validation as cv from homeassistant.const import ( - CONF_NAME, + ATTR_LATITUDE, + ATTR_LONGITUDE, + CONF_ICON, CONF_LATITUDE, CONF_LONGITUDE, - CONF_ICON, + CONF_NAME, CONF_RADIUS, EVENT_CORE_CONFIG_UPDATE, ) +from homeassistant.core import State, callback from homeassistant.helpers import config_per_platform +import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import async_generate_entity_id +from homeassistant.loader import bind_hass from homeassistant.util import slugify -from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE from homeassistant.util.location import distance - from .config_flow import configured_zones -from .const import CONF_PASSIVE, DOMAIN, HOME_ZONE, ATTR_PASSIVE, ATTR_RADIUS +from .const import ATTR_PASSIVE, ATTR_RADIUS, CONF_PASSIVE, DOMAIN, HOME_ZONE from .zone import Zone - # mypy: allow-untyped-calls, allow-untyped-defs _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/zone/config_flow.py b/homeassistant/components/zone/config_flow.py index 39633754772..4531ff7b834 100644 --- a/homeassistant/components/zone/config_flow.py +++ b/homeassistant/components/zone/config_flow.py @@ -4,22 +4,21 @@ from typing import Set import voluptuous as vol -import homeassistant.helpers.config_validation as cv from homeassistant import config_entries from homeassistant.const import ( - CONF_NAME, + CONF_ICON, CONF_LATITUDE, CONF_LONGITUDE, - CONF_ICON, + CONF_NAME, CONF_RADIUS, ) from homeassistant.core import callback +import homeassistant.helpers.config_validation as cv from homeassistant.helpers.typing import HomeAssistantType from homeassistant.util import slugify from .const import CONF_PASSIVE, DOMAIN, HOME_ZONE - # mypy: allow-untyped-defs, no-check-untyped-defs diff --git a/tests/components/zone/test_config_flow.py b/tests/components/zone/test_config_flow.py index 1e1bca9cdea..5f57e8b4064 100644 --- a/tests/components/zone/test_config_flow.py +++ b/tests/components/zone/test_config_flow.py @@ -3,10 +3,10 @@ from homeassistant.components.zone import config_flow from homeassistant.components.zone.const import CONF_PASSIVE, DOMAIN, HOME_ZONE from homeassistant.const import ( - CONF_NAME, + CONF_ICON, CONF_LATITUDE, CONF_LONGITUDE, - CONF_ICON, + CONF_NAME, CONF_RADIUS, ) diff --git a/tests/components/zone/test_init.py b/tests/components/zone/test_init.py index b5b975ae4bd..d4a76463c18 100644 --- a/tests/components/zone/test_init.py +++ b/tests/components/zone/test_init.py @@ -6,8 +6,7 @@ from unittest.mock import Mock from homeassistant import setup from homeassistant.components import zone -from tests.common import get_test_home_assistant -from tests.common import MockConfigEntry +from tests.common import MockConfigEntry, get_test_home_assistant async def test_setup_entry_successful(hass):