From 41ae572875252a09f0130e8452052351f71774e6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Sat, 18 Nov 2023 17:10:06 +0000 Subject: [PATCH] Removes circular dependency error --- custom_components/versatile_thermostat/base_thermostat.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_components/versatile_thermostat/base_thermostat.py b/custom_components/versatile_thermostat/base_thermostat.py index 072deb1..92ecab8 100644 --- a/custom_components/versatile_thermostat/base_thermostat.py +++ b/custom_components/versatile_thermostat/base_thermostat.py @@ -109,8 +109,6 @@ from .const import ( PRESET_AC_SUFFIX, ) -from .commons import get_tz - from .underlyings import UnderlyingEntity from .prop_algorithm import PropAlgorithm @@ -120,6 +118,12 @@ from .ema import EstimatedMobileAverage _LOGGER = logging.getLogger(__name__) +def get_tz(hass: HomeAssistant): + """Get the current timezone""" + + return dt_util.get_time_zone(hass.config.time_zone) + + class BaseThermostat(ClimateEntity, RestoreEntity): """Representation of a base class for all Versatile Thermostat device."""