mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-11-25 06:46:25 +00:00
fix: pydantic extra keywords deprecated (#753)
Pydantic deprecates using extra keyword arguments on Field. Used json_schema_extra instead. Deprecated in Pydantic V2.0 to be removed in V3.0. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -24,17 +24,23 @@ class EnergyManagementCommonSettings(SettingsBaseModel):
|
||||
startup_delay: float = Field(
|
||||
default=5,
|
||||
ge=1,
|
||||
description="Startup delay in seconds for EOS energy management runs.",
|
||||
json_schema_extra={
|
||||
"description": "Startup delay in seconds for EOS energy management runs."
|
||||
},
|
||||
)
|
||||
|
||||
interval: Optional[float] = Field(
|
||||
default=None,
|
||||
description="Intervall in seconds between EOS energy management runs.",
|
||||
examples=["300"],
|
||||
json_schema_extra={
|
||||
"description": "Intervall in seconds between EOS energy management runs.",
|
||||
"examples": ["300"],
|
||||
},
|
||||
)
|
||||
|
||||
mode: Optional[EnergyManagementMode] = Field(
|
||||
default=None,
|
||||
description="Energy management mode [OPTIMIZATION | PREDICTION].",
|
||||
examples=["OPTIMIZATION", "PREDICTION"],
|
||||
json_schema_extra={
|
||||
"description": "Energy management mode [OPTIMIZATION | PREDICTION].",
|
||||
"examples": ["OPTIMIZATION", "PREDICTION"],
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user