Issue_766-enhance_power_management (#778)
* First implem + tests (not finished) * With tests of calculate_shedding ok * Commit for rebase * All tests ok for central_feature_power_manager * All tests not ok * All tests ok * integrattion tests - Do startup works * enhance the overpowering algo if current_power > max_power * Change shedding calculation delay to 20 sec (vs 60 sec) * Integration tests ok * Fix overpowering is set even if other heater have on_percent = 0 * Fix too much shedding in over_climate * Add logs * Add temporal filter for calculate_shedding Add restore overpowering state at startup * Fix restore overpowering_state * Removes poweer_entity_id from vtherm non central config * Release * Add Sonoff TRVZB in creation.md * Add comment on Sonoff TRVZB Closing degree --------- Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
This commit is contained in:
@@ -212,6 +212,13 @@ async def test_underlying_change_follow(
|
||||
tz = get_tz(hass) # pylint: disable=invalid-name
|
||||
now: datetime = datetime.now(tz=tz)
|
||||
|
||||
temps = {
|
||||
PRESET_FROST_PROTECTION: 7,
|
||||
PRESET_ECO: 16,
|
||||
PRESET_COMFORT: 17,
|
||||
PRESET_BOOST: 18,
|
||||
}
|
||||
|
||||
entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="TheOverClimateMockName",
|
||||
@@ -232,7 +239,7 @@ async def test_underlying_change_follow(
|
||||
) as mock_find_climate, patch(
|
||||
"custom_components.versatile_thermostat.underlyings.UnderlyingClimate.set_hvac_mode"
|
||||
) as mock_underlying_set_hvac_mode:
|
||||
entity = await create_thermostat(hass, entry, "climate.theoverclimatemockname")
|
||||
entity = await create_thermostat(hass, entry, "climate.theoverclimatemockname", temps)
|
||||
|
||||
assert entity
|
||||
assert entity.name == "TheOverClimateMockName"
|
||||
@@ -354,6 +361,13 @@ async def test_underlying_change_not_follow(
|
||||
tz = get_tz(hass) # pylint: disable=invalid-name
|
||||
now: datetime = datetime.now(tz=tz)
|
||||
|
||||
temps = {
|
||||
PRESET_FROST_PROTECTION: 7,
|
||||
PRESET_ECO: 16,
|
||||
PRESET_COMFORT: 17,
|
||||
PRESET_BOOST: 18,
|
||||
}
|
||||
|
||||
entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="TheOverClimateMockName",
|
||||
@@ -374,7 +388,7 @@ async def test_underlying_change_not_follow(
|
||||
) as mock_find_climate, patch(
|
||||
"custom_components.versatile_thermostat.underlyings.UnderlyingClimate.set_hvac_mode"
|
||||
) as mock_underlying_set_hvac_mode:
|
||||
entity = await create_thermostat(hass, entry, "climate.theoverclimatemockname")
|
||||
entity = await create_thermostat(hass, entry, "climate.theoverclimatemockname", temps)
|
||||
|
||||
assert entity
|
||||
|
||||
@@ -726,6 +740,13 @@ async def test_ignore_temp_outside_minmax_range(
|
||||
tz = get_tz(hass) # pylint: disable=invalid-name
|
||||
now: datetime = datetime.now(tz=tz)
|
||||
|
||||
temps = {
|
||||
PRESET_FROST_PROTECTION: 7,
|
||||
PRESET_ECO: 16,
|
||||
PRESET_COMFORT: 17,
|
||||
PRESET_BOOST: 18,
|
||||
}
|
||||
|
||||
entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="TheOverClimateMockName",
|
||||
@@ -746,7 +767,7 @@ async def test_ignore_temp_outside_minmax_range(
|
||||
) as mock_find_climate, patch(
|
||||
"custom_components.versatile_thermostat.underlyings.UnderlyingClimate.set_hvac_mode"
|
||||
) as mock_underlying_set_hvac_mode:
|
||||
entity = await create_thermostat(hass, entry, "climate.theoverclimatemockname")
|
||||
entity = await create_thermostat(hass, entry, "climate.theoverclimatemockname", temps)
|
||||
|
||||
assert entity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user