Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96076bf7c2 | |||
| a3f7043f45 | |||
| 67c01b02ec |
@@ -173,6 +173,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
|||||||
"max_power_sensor_entity_id",
|
"max_power_sensor_entity_id",
|
||||||
"temperature_unit",
|
"temperature_unit",
|
||||||
"is_device_active",
|
"is_device_active",
|
||||||
|
"target_temperature_step",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -297,6 +298,8 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
|||||||
self._ext_temp_sensor_entity_id = entry_infos.get(CONF_EXTERNAL_TEMP_SENSOR)
|
self._ext_temp_sensor_entity_id = entry_infos.get(CONF_EXTERNAL_TEMP_SENSOR)
|
||||||
self._attr_max_temp = entry_infos.get(CONF_TEMP_MAX)
|
self._attr_max_temp = entry_infos.get(CONF_TEMP_MAX)
|
||||||
self._attr_min_temp = entry_infos.get(CONF_TEMP_MIN)
|
self._attr_min_temp = entry_infos.get(CONF_TEMP_MIN)
|
||||||
|
# Default value not configurable
|
||||||
|
self._attr_target_temperature_step = 0.1
|
||||||
self._power_sensor_entity_id = entry_infos.get(CONF_POWER_SENSOR)
|
self._power_sensor_entity_id = entry_infos.get(CONF_POWER_SENSOR)
|
||||||
self._max_power_sensor_entity_id = entry_infos.get(CONF_MAX_POWER_SENSOR)
|
self._max_power_sensor_entity_id = entry_infos.get(CONF_MAX_POWER_SENSOR)
|
||||||
self._window_sensor_entity_id = entry_infos.get(CONF_WINDOW_SENSOR)
|
self._window_sensor_entity_id = entry_infos.get(CONF_WINDOW_SENSOR)
|
||||||
@@ -904,27 +907,6 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
|||||||
"""Return the sensor temperature."""
|
"""Return the sensor temperature."""
|
||||||
return self._cur_temp
|
return self._cur_temp
|
||||||
|
|
||||||
@property
|
|
||||||
def target_temperature_step(self) -> float | None:
|
|
||||||
"""Return the supported step of target temperature."""
|
|
||||||
return None
|
|
||||||
|
|
||||||
@property
|
|
||||||
def target_temperature_high(self) -> float | None:
|
|
||||||
"""Return the highbound target temperature we try to reach.
|
|
||||||
|
|
||||||
Requires ClimateEntityFeature.TARGET_TEMPERATURE_RANGE.
|
|
||||||
"""
|
|
||||||
return None
|
|
||||||
|
|
||||||
@property
|
|
||||||
def target_temperature_low(self) -> float | None:
|
|
||||||
"""Return the lowbound target temperature we try to reach.
|
|
||||||
|
|
||||||
Requires ClimateEntityFeature.TARGET_TEMPERATURE_RANGE.
|
|
||||||
"""
|
|
||||||
return None
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_aux_heat(self) -> bool | None:
|
def is_aux_heat(self) -> bool | None:
|
||||||
"""Return true if aux heater.
|
"""Return true if aux heater.
|
||||||
@@ -2120,6 +2102,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
|||||||
"power_temp": self._power_temp,
|
"power_temp": self._power_temp,
|
||||||
# Already in super class - "target_temp": self.target_temperature,
|
# Already in super class - "target_temp": self.target_temperature,
|
||||||
# Already in super class - "current_temp": self._cur_temp,
|
# Already in super class - "current_temp": self._cur_temp,
|
||||||
|
"target_temperature_step": self.target_temperature_step,
|
||||||
"ext_current_temperature": self._cur_ext_temp,
|
"ext_current_temperature": self._cur_ext_temp,
|
||||||
"ac_mode": self._ac_mode,
|
"ac_mode": self._ac_mode,
|
||||||
"current_power": self._current_power,
|
"current_power": self._current_power,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from datetime import datetime
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
# To filter bad values
|
# To filter bad values
|
||||||
MIN_DELTA_T_SEC = 10 # two temp mesure should be > 10 sec
|
MIN_DELTA_T_SEC = 30 # two temp mesure should be > 10 sec
|
||||||
MAX_SLOPE_VALUE = 2 # slope cannot be > 2 or < -2 -> else this is an aberrant point
|
MAX_SLOPE_VALUE = 2 # slope cannot be > 2 or < -2 -> else this is an aberrant point
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ class ThermostatOverClimate(BaseThermostat):
|
|||||||
self._regulated_target_temp = self.target_temperature
|
self._regulated_target_temp = self.target_temperature
|
||||||
|
|
||||||
_LOGGER.info("%s - regulation calculation will be done", self)
|
_LOGGER.info("%s - regulation calculation will be done", self)
|
||||||
|
self._last_regulation_change = now
|
||||||
|
|
||||||
new_regulated_temp = round_to_nearest(
|
new_regulated_temp = round_to_nearest(
|
||||||
self._regulation_algo.calculate_regulated_temperature(
|
self._regulation_algo.calculate_regulated_temperature(
|
||||||
@@ -154,7 +155,6 @@ class ThermostatOverClimate(BaseThermostat):
|
|||||||
self,
|
self,
|
||||||
new_regulated_temp,
|
new_regulated_temp,
|
||||||
)
|
)
|
||||||
self._last_regulation_change = now
|
|
||||||
|
|
||||||
for under in self._underlyings:
|
for under in self._underlyings:
|
||||||
await under.set_temperature(
|
await under.set_temperature(
|
||||||
|
|||||||
Reference in New Issue
Block a user