mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Fix radiotherm local time (#26526)
We want to use our own dt_util.now() which takes into consideration the globally set DEFAULT_TIME_ZONE
This commit is contained in:
parent
30fb4ddc98
commit
f3123ee0ca
@ -1,5 +1,4 @@
|
|||||||
"""Support for Radio Thermostat wifi-enabled home thermostats."""
|
"""Support for Radio Thermostat wifi-enabled home thermostats."""
|
||||||
import datetime
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -26,6 +25,7 @@ from homeassistant.const import (
|
|||||||
TEMP_FAHRENHEIT,
|
TEMP_FAHRENHEIT,
|
||||||
STATE_ON,
|
STATE_ON,
|
||||||
)
|
)
|
||||||
|
from homeassistant.util import dt as dt_util
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -310,7 +310,7 @@ class RadioThermostat(ClimateDevice):
|
|||||||
"""Set device time."""
|
"""Set device time."""
|
||||||
# Calling this clears any local temperature override and
|
# Calling this clears any local temperature override and
|
||||||
# reverts to the scheduled temperature.
|
# reverts to the scheduled temperature.
|
||||||
now = datetime.datetime.now()
|
now = dt_util.now()
|
||||||
self.device.time = {
|
self.device.time = {
|
||||||
"day": now.weekday(),
|
"day": now.weekday(),
|
||||||
"hour": now.hour,
|
"hour": now.hour,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user