Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f95ed74f4 | |||
| 6e42904ddf |
@@ -13,7 +13,6 @@ from homeassistant.util import dt as dt_util
|
||||
from homeassistant.core import (
|
||||
HomeAssistant,
|
||||
callback,
|
||||
CoreState,
|
||||
Event,
|
||||
State,
|
||||
)
|
||||
@@ -57,7 +56,6 @@ from homeassistant.const import (
|
||||
STATE_UNKNOWN,
|
||||
STATE_OFF,
|
||||
STATE_ON,
|
||||
EVENT_HOMEASSISTANT_START,
|
||||
STATE_HOME,
|
||||
STATE_NOT_HOME,
|
||||
)
|
||||
@@ -299,7 +297,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
||||
self._presets: dict[str, Any] = {} # presets
|
||||
self._presets_away: dict[str, Any] = {} # presets_away
|
||||
|
||||
self._attr_preset_modes: list[str] | None
|
||||
self._attr_preset_modes: list[str] = []
|
||||
|
||||
self._use_central_config_temperature = False
|
||||
|
||||
@@ -2183,7 +2181,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
||||
new_central_mode,
|
||||
)
|
||||
|
||||
first_init = self._last_central_mode == None
|
||||
first_init = self._last_central_mode is None
|
||||
|
||||
self._last_central_mode = new_central_mode
|
||||
|
||||
|
||||
@@ -145,6 +145,12 @@ class ThermostatOverClimate(BaseThermostat[UnderlyingClimate]):
|
||||
_LOGGER.debug("%s - don't send regulated temperature cause VTherm is off ")
|
||||
return
|
||||
|
||||
if self.current_temperature is None or self.target_temperature is None:
|
||||
_LOGGER.warning(
|
||||
"%s - don't send regulated temperature cause VTherm current_temp (%s) or target_temp (%s) is None. This should be a temporary warning message."
|
||||
)
|
||||
return
|
||||
|
||||
_LOGGER.info(
|
||||
"%s - Calling ThermostatClimate._send_regulated_temperature force=%s",
|
||||
self,
|
||||
@@ -172,7 +178,7 @@ class ThermostatOverClimate(BaseThermostat[UnderlyingClimate]):
|
||||
_LOGGER.debug("%s - usage of regulation_step: %.2f ",
|
||||
self,
|
||||
regulation_step)
|
||||
|
||||
|
||||
new_regulated_temp = round_to_nearest(
|
||||
self._regulation_algo.calculate_regulated_temperature(
|
||||
self.current_temperature, self._cur_ext_temp
|
||||
|
||||
Reference in New Issue
Block a user