mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-10-15 02:21:56 +00:00
fix: provider settings in top level field of configuration (#1161)
Configuration for some providers was given in the sub-field `provider_settings` combining the settings of several providers. Pydantic does not understand this very well and the configuration became cumbersome, especially in EOSdash. All provider settings from the `provider-settings` sub-field are now lifted to the top level field of the configuration. The changes are automatically migrated in the configuration. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -44,16 +44,16 @@ class LoadCommonSettings(SettingsBaseModel):
|
||||
json_schema_extra={"description": "LoadAkkudoktor provider settings."},
|
||||
)
|
||||
|
||||
loadvrm: LoadVrmCommonSettings = Field(
|
||||
default_factory=LoadVrmCommonSettings,
|
||||
json_schema_extra={"description": "LoadVrm provider settings."},
|
||||
)
|
||||
|
||||
loadimport: LoadImportCommonSettings = Field(
|
||||
default_factory=LoadImportCommonSettings,
|
||||
json_schema_extra={"description": "LoadImport provider settings."},
|
||||
)
|
||||
|
||||
vrm: LoadVrmCommonSettings = Field(
|
||||
default_factory=LoadVrmCommonSettings,
|
||||
json_schema_extra={"description": "Victron Remote Management (VRM) provider settings."},
|
||||
)
|
||||
|
||||
@computed_field # type: ignore[prop-decorator]
|
||||
@property
|
||||
def providers(self) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user