Compare commits
2 Commits
5.4.0.alph
...
5.4.0.beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7656a4a43 | ||
|
|
99cfe81662 |
@@ -128,7 +128,7 @@ En conséquence toute la phase de paramètrage d'un VTherm a été profondemment
|
|||||||
**Note :** les copies d'écran de la configuration d'un VTherm n'ont pas été mises à jour.
|
**Note :** les copies d'écran de la configuration d'un VTherm n'ont pas été mises à jour.
|
||||||
|
|
||||||
# Merci pour la bière [buymecoffee](https://www.buymeacoffee.com/jmcollin78)
|
# Merci pour la bière [buymecoffee](https://www.buymeacoffee.com/jmcollin78)
|
||||||
Un grand merci à @salabur, @pvince83, @bergoglio, @EPicLURcher, @ecolorado66, @Kriss1670, @maia, @f.maymil, @moutte69, @Jerome, @Gunnar M, @Greg.o, @John Burgess, @abyssmal, @capinfo26, @Helge, @MattG @Mexx62, @Someone, @Lajull, @giopeco pour les bières. Ca fait très plaisir et ça m'encourage à continuer !
|
Un grand merci à @salabur, @pvince83, @bergoglio, @EPicLURcher, @ecolorado66, @Kriss1670, @maia, @f.maymil, @moutte69, @Jerome, @Gunnar M, @Greg.o, @John Burgess, @abyssmal, @capinfo26, @Helge, @MattG @Mexx62, @Someone, @Lajull, @giopeco, @fredericselier, @philpagan pour les bières. Ca fait très plaisir et ça m'encourage à continuer !
|
||||||
|
|
||||||
|
|
||||||
# Quand l'utiliser et ne pas l'utiliser
|
# Quand l'utiliser et ne pas l'utiliser
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ Consequently, the entire configuration phase of a VTherm has been profoundly mod
|
|||||||
**Note:** the VTherm configuration screenshots have not been updated.
|
**Note:** the VTherm configuration screenshots have not been updated.
|
||||||
|
|
||||||
# Thanks for the beer [buymecoffee](https://www.buymeacoffee.com/jmcollin78)
|
# Thanks for the beer [buymecoffee](https://www.buymeacoffee.com/jmcollin78)
|
||||||
Many thanks to @salabur, @pvince83, @bergoglio, @EPicLURcher, @ecolorado66, @Kriss1670, @maia, @f.maymil, @moutte69, @Jerome, @Gunnar M, @Greg.o, @John Burgess, @abyssmal, @capinfo26, @Helge, @MattG, @MattG, @Mexx62, @Someone, @Lajull, @giopeco for the beers. It's very nice and encourages me to continue!
|
Many thanks to @salabur, @pvince83, @bergoglio, @EPicLURcher, @ecolorado66, @Kriss1670, @maia, @f.maymil, @moutte69, @Jerome, @Gunnar M, @Greg.o, @John Burgess, @abyssmal, @capinfo26, @Helge, @MattG, @MattG, @Mexx62, @Someone, @Lajull, @giopeco, @fredericselier, @philpagan for the beers. It's very nice and encourages me to continue!
|
||||||
|
|
||||||
# When to use / not use
|
# When to use / not use
|
||||||
This thermostat can control 3 types of equipment:
|
This thermostat can control 3 types of equipment:
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ class PITemperatureRegulator:
|
|||||||
def set_target_temp(self, target_temp):
|
def set_target_temp(self, target_temp):
|
||||||
"""Set the new target_temp"""
|
"""Set the new target_temp"""
|
||||||
self.target_temp = target_temp
|
self.target_temp = target_temp
|
||||||
# Do not reset the accumulated error
|
|
||||||
# Discussion #191. After a target change we should reset the accumulated error which is certainly wrong now.
|
# Discussion #191. After a target change we should reset the accumulated error which is certainly wrong now.
|
||||||
if self.accumulated_error < 0:
|
# Discussion #384. Finally don't reset the accumulated error but smoothly reset it if the sign is inversed
|
||||||
self.accumulated_error = 0
|
# if self.accumulated_error < 0:
|
||||||
|
# self.accumulated_error = 0
|
||||||
|
|
||||||
def calculate_regulated_temperature(
|
def calculate_regulated_temperature(
|
||||||
self, room_temp: float, external_temp: float
|
self, room_temp: float, external_temp: float
|
||||||
@@ -71,6 +71,11 @@ class PITemperatureRegulator:
|
|||||||
error = self.target_temp - room_temp
|
error = self.target_temp - room_temp
|
||||||
|
|
||||||
# Calculate the sum of error (I)
|
# Calculate the sum of error (I)
|
||||||
|
# Discussion #384. Finally don't reset the accumulated error but smoothly reset it if the sign is inversed
|
||||||
|
# If the error have change its sign, reset smoothly the accumulated error
|
||||||
|
if error * self.accumulated_error < 0:
|
||||||
|
self.accumulated_error = self.accumulated_error / 2.0
|
||||||
|
|
||||||
self.accumulated_error += error
|
self.accumulated_error += error
|
||||||
|
|
||||||
# Capping of the error
|
# Capping of the error
|
||||||
|
|||||||
@@ -127,9 +127,7 @@ async def test_over_climate_regulation(
|
|||||||
|
|
||||||
# the regulated temperature should be under
|
# the regulated temperature should be under
|
||||||
assert entity.regulated_target_temp < entity.target_temperature
|
assert entity.regulated_target_temp < entity.target_temperature
|
||||||
assert (
|
assert entity.regulated_target_temp == 18 - 2.5
|
||||||
entity.regulated_target_temp == 18 - 2
|
|
||||||
) # normally 0.6 but round_to_nearest gives 0.5
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("expected_lingering_tasks", [True])
|
@pytest.mark.parametrize("expected_lingering_tasks", [True])
|
||||||
@@ -525,7 +523,7 @@ async def test_over_climate_regulation_use_device_temp(
|
|||||||
|
|
||||||
# the regulated temperature should be upper (device offset is +2)
|
# the regulated temperature should be upper (device offset is +2)
|
||||||
assert entity.regulated_target_temp < entity.target_temperature
|
assert entity.regulated_target_temp < entity.target_temperature
|
||||||
assert entity.regulated_target_temp == 22.9
|
assert entity.regulated_target_temp == 22.4
|
||||||
|
|
||||||
mock_service_call.assert_has_calls(
|
mock_service_call.assert_has_calls(
|
||||||
[
|
[
|
||||||
@@ -534,7 +532,7 @@ async def test_over_climate_regulation_use_device_temp(
|
|||||||
"set_temperature",
|
"set_temperature",
|
||||||
{
|
{
|
||||||
"entity_id": "climate.mock_climate",
|
"entity_id": "climate.mock_climate",
|
||||||
"temperature": 24.9, # 22.9 + 2° of offset
|
"temperature": 24.4, # 22.4 + 2° of offset
|
||||||
"target_temp_high": 30,
|
"target_temp_high": 30,
|
||||||
"target_temp_low": 15,
|
"target_temp_low": 15,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user