mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-10-29 17:21:57 +00:00
fix(planning): accept full SoC targets and clarify unlimited EV SoC age (#1407)
* fix(devices): allow charging targets equal to the maximum SoC * test(planning): protect EV SoC without age limits
This commit is contained in:
@@ -315,8 +315,8 @@ class BatteriesCommonSettings(DevicesBaseSettings):
|
||||
|
||||
@model_validator(mode="after")
|
||||
def _validate_soc_range(self) -> "BatteriesCommonSettings":
|
||||
if self.min_soc_percentage >= self.max_soc_percentage:
|
||||
raise ValueError("min_soc_percentage must be < max_soc_percentage")
|
||||
if self.min_soc_percentage > self.max_soc_percentage:
|
||||
raise ValueError("min_soc_percentage must be <= max_soc_percentage")
|
||||
if (
|
||||
self.min_charge_power_w is not None
|
||||
and self.max_charge_power_w is not None
|
||||
|
||||
Reference in New Issue
Block a user