mirror of
				https://github.com/Akkudoktor-EOS/EOS.git
				synced 2025-10-31 14:56:21 +00:00 
			
		
		
		
	Cleanup: parameters: extra=forbid, optimize: battery, inverter optional (#361)
* Cleanup: parameters: extra=forbid, optimize: battery, inverter optional * Don't allow extra fields for parameters/REST-API (at least for now while changing API). * Allow both battery and inverter to be set optionally (atm optional battery not implemented, no API constraints). * inverter: Remove default max_power_wh * single_test_optimization: Add more cli-parameters * Workflow docker-build: Don't try to authenticate for PRs * Secrets are not available anyway for forks.
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							745086c2eb
						
					
				
				
					commit
					9ad61f66b2
				
			| @@ -4,6 +4,7 @@ import numpy as np | ||||
| from pydantic import BaseModel, Field, field_validator | ||||
|  | ||||
| from akkudoktoreos.core.logging import get_logger | ||||
| from akkudoktoreos.core.pydantic import ParametersBaseModel | ||||
| from akkudoktoreos.devices.devicesabc import DeviceBase | ||||
| from akkudoktoreos.utils.utils import NumpyEncoder | ||||
|  | ||||
| @@ -24,7 +25,7 @@ def initial_soc_percentage_field(description: str) -> int: | ||||
|     return Field(default=0, ge=0, le=100, description=description) | ||||
|  | ||||
|  | ||||
| class BaseBatteryParameters(BaseModel): | ||||
| class BaseBatteryParameters(ParametersBaseModel): | ||||
|     """Base class for battery parameters with fields for capacity, efficiency, and state of charge.""" | ||||
|  | ||||
|     capacity_wh: int = Field( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user