From f3123ee0ca21da7fc02c0f870672d1c29b322961 Mon Sep 17 00:00:00 2001 From: Tsvi Mostovicz Date: Tue, 10 Sep 2019 00:41:47 +0300 Subject: [PATCH] Fix radiotherm local time (#26526) We want to use our own dt_util.now() which takes into consideration the globally set DEFAULT_TIME_ZONE --- homeassistant/components/radiotherm/climate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/radiotherm/climate.py b/homeassistant/components/radiotherm/climate.py index 2585dc0b00b..a007dd673ac 100644 --- a/homeassistant/components/radiotherm/climate.py +++ b/homeassistant/components/radiotherm/climate.py @@ -1,5 +1,4 @@ """Support for Radio Thermostat wifi-enabled home thermostats.""" -import datetime import logging import voluptuous as vol @@ -26,6 +25,7 @@ from homeassistant.const import ( TEMP_FAHRENHEIT, STATE_ON, ) +from homeassistant.util import dt as dt_util import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) @@ -310,7 +310,7 @@ class RadioThermostat(ClimateDevice): """Set device time.""" # Calling this clears any local temperature override and # reverts to the scheduled temperature. - now = datetime.datetime.now() + now = dt_util.now() self.device.time = { "day": now.weekday(), "hour": now.hour,