Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a13b8087d | |||
| 449c7b8158 | |||
| 43d8e5eb3c |
@@ -14,6 +14,6 @@
|
|||||||
"quality_scale": "silver",
|
"quality_scale": "silver",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"ssdp": [],
|
"ssdp": [],
|
||||||
"version": "7.1.2",
|
"version": "7.1.3",
|
||||||
"zeroconf": []
|
"zeroconf": []
|
||||||
}
|
}
|
||||||
@@ -255,6 +255,10 @@ class ThermostatOverClimateValve(ThermostatOverClimate):
|
|||||||
self._attr_min_temp,
|
self._attr_min_temp,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self._last_regulation_change = self.now
|
||||||
|
|
||||||
|
_LOGGER.debug("%s - last_regulation_change is now: %s", self, self._last_regulation_change)
|
||||||
|
|
||||||
for under in self._underlyings_valve_regulation:
|
for under in self._underlyings_valve_regulation:
|
||||||
await under.set_valve_open_percent()
|
await under.set_valve_open_percent()
|
||||||
|
|
||||||
@@ -263,11 +267,6 @@ class ThermostatOverClimateValve(ThermostatOverClimate):
|
|||||||
"""True if the Thermostat is regulated by valve"""
|
"""True if the Thermostat is regulated by valve"""
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# @property
|
|
||||||
# def hvac_modes(self) -> list[HVACMode]:
|
|
||||||
# """Get the hvac_modes"""
|
|
||||||
# return self._hvac_list
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def valve_open_percent(self) -> int:
|
def valve_open_percent(self) -> int:
|
||||||
"""Gives the percentage of valve needed"""
|
"""Gives the percentage of valve needed"""
|
||||||
|
|||||||
@@ -632,22 +632,23 @@ class UnderlyingClimate(UnderlyingEntity):
|
|||||||
|
|
||||||
# Issue 508 we have to take care of service set_temperature or set_range
|
# Issue 508 we have to take care of service set_temperature or set_range
|
||||||
target_temp = self.cap_sent_value(temperature)
|
target_temp = self.cap_sent_value(temperature)
|
||||||
if (
|
data = {
|
||||||
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
ATTR_ENTITY_ID: self._entity_id,
|
||||||
in self._underlying_climate.supported_features
|
}
|
||||||
):
|
|
||||||
data = {
|
_LOGGER.info("%s - Set setpoint temperature to: %s", self, target_temp)
|
||||||
ATTR_ENTITY_ID: self._entity_id,
|
|
||||||
"target_temp_high": target_temp,
|
# Issue 807 add TARGET_TEMPERATURE only if in the features
|
||||||
"target_temp_low": target_temp,
|
if ClimateEntityFeature.TARGET_TEMPERATURE_RANGE in self._underlying_climate.supported_features:
|
||||||
# issue 518 - we should send also the target temperature, even in TARGET RANGE
|
data.update(
|
||||||
"temperature": target_temp,
|
{
|
||||||
}
|
"target_temp_high": target_temp,
|
||||||
else:
|
"target_temp_low": target_temp,
|
||||||
data = {
|
}
|
||||||
ATTR_ENTITY_ID: self._entity_id,
|
)
|
||||||
"temperature": target_temp,
|
|
||||||
}
|
if ClimateEntityFeature.TARGET_TEMPERATURE in self._underlying_climate.supported_features:
|
||||||
|
data["temperature"] = target_temp
|
||||||
|
|
||||||
await self._hass.services.async_call(
|
await self._hass.services.async_call(
|
||||||
CLIMATE_DOMAIN,
|
CLIMATE_DOMAIN,
|
||||||
@@ -656,6 +657,7 @@ class UnderlyingClimate(UnderlyingEntity):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self._last_sent_temperature = target_temp
|
self._last_sent_temperature = target_temp
|
||||||
|
_LOGGER.debug("%s - Last_sent_temperature is now: %s", self, self._last_sent_temperature)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def last_sent_temperature(self) -> float | None:
|
def last_sent_temperature(self) -> float | None:
|
||||||
|
|||||||
@@ -580,7 +580,6 @@ async def test_bug_508(
|
|||||||
# "temperature": 17.5,
|
# "temperature": 17.5,
|
||||||
"target_temp_high": 10,
|
"target_temp_high": 10,
|
||||||
"target_temp_low": 10,
|
"target_temp_low": 10,
|
||||||
"temperature": 10,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@@ -604,7 +603,6 @@ async def test_bug_508(
|
|||||||
"entity_id": "climate.mock_climate",
|
"entity_id": "climate.mock_climate",
|
||||||
"target_temp_high": 31,
|
"target_temp_high": 31,
|
||||||
"target_temp_low": 31,
|
"target_temp_low": 31,
|
||||||
"temperature": 31,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user