From 77e6859e067285431122d064c7d44ff422bfce85 Mon Sep 17 00:00:00 2001 From: Thomas55555 <59625598+Thomas55555@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:24:16 +0000 Subject: [PATCH] move lat_long_bounds to map_utils --- custom_components/husqvarna_automower/const.py | 2 -- custom_components/husqvarna_automower/map_utils.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/custom_components/husqvarna_automower/const.py b/custom_components/husqvarna_automower/const.py index 2cdccfb..5d22604 100644 --- a/custom_components/husqvarna_automower/const.py +++ b/custom_components/husqvarna_automower/const.py @@ -1,6 +1,5 @@ """The constants for the Husqvarna Automower integration.""" from homeassistant.const import Platform -from shapely.geometry import Polygon # Base component constants NAME = "husqvarna_automower" @@ -58,7 +57,6 @@ ZONE_ID = "zone_id" ZONE_FINISH = "save" ZONE_MOWERS = "sel_mowers" -LAT_LON_BOUNDS = Polygon.from_bounds(xmin=-90.0, ymin=-180.0, xmax=90.0, ymax=180.0) # Defaults diff --git a/custom_components/husqvarna_automower/map_utils.py b/custom_components/husqvarna_automower/map_utils.py index 16702f5..f8b69d8 100644 --- a/custom_components/husqvarna_automower/map_utils.py +++ b/custom_components/husqvarna_automower/map_utils.py @@ -1,9 +1,9 @@ """Utilities for parsing and validating coordinates.""" from PIL import Image, UnidentifiedImageError -from shapely.geometry import Point +from shapely.geometry import Point, Polygon -from .const import LAT_LON_BOUNDS +LAT_LON_BOUNDS = Polygon.from_bounds(xmin=-90.0, ymin=-180.0, xmax=90.0, ymax=180.0) def validate_rotation(rotation: float) -> float: