mirror of
				https://github.com/Akkudoktor-EOS/EOS.git
				synced 2025-10-31 06:46:20 +00:00 
			
		
		
		
	translation of battery.py v3 (#262)
This commit is contained in:
		| @@ -7,7 +7,11 @@ from akkudoktoreos.core.ems import ( | ||||
|     EnergieManagementSystemParameters, | ||||
|     get_ems, | ||||
| ) | ||||
| from akkudoktoreos.devices.battery import EAutoParameters, PVAkku, PVAkkuParameters | ||||
| from akkudoktoreos.devices.battery import ( | ||||
|     Battery, | ||||
|     ElectricVehicleParameters, | ||||
|     SolarPanelBatteryParameters, | ||||
| ) | ||||
| from akkudoktoreos.devices.generic import HomeAppliance, HomeApplianceParameters | ||||
| from akkudoktoreos.devices.inverter import Inverter, InverterParameters | ||||
|  | ||||
| @@ -24,8 +28,10 @@ def create_ems_instance() -> EnergieManagementSystem: | ||||
|     assert config_eos.prediction_hours is not None | ||||
|  | ||||
|     # Initialize the battery and the inverter | ||||
|     akku = PVAkku( | ||||
|         PVAkkuParameters(kapazitaet_wh=5000, start_soc_prozent=80, min_soc_prozent=10), | ||||
|     akku = Battery( | ||||
|         SolarPanelBatteryParameters( | ||||
|             capacity_wh=5000, initial_soc_percentage=80, min_soc_percentage=10 | ||||
|         ), | ||||
|         hours=config_eos.prediction_hours, | ||||
|     ) | ||||
|     akku.reset() | ||||
| @@ -42,8 +48,10 @@ def create_ems_instance() -> EnergieManagementSystem: | ||||
|     home_appliance.set_starting_time(2) | ||||
|  | ||||
|     # Example initialization of electric car battery | ||||
|     eauto = PVAkku( | ||||
|         EAutoParameters(kapazitaet_wh=26400, start_soc_prozent=100, min_soc_prozent=100), | ||||
|     eauto = Battery( | ||||
|         ElectricVehicleParameters( | ||||
|             capacity_wh=26400, initial_soc_percentage=100, min_soc_percentage=100 | ||||
|         ), | ||||
|         hours=config_eos.prediction_hours, | ||||
|     ) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user