Skip to content

Commit

Permalink
Update energy_manager.py
Browse files Browse the repository at this point in the history
Change discharge msg
  • Loading branch information
petehhhhh authored May 11, 2024
1 parent b1d0e22 commit 1ec1d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/manage_energy/energy_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ async def handle_manage_energy(self):
if await self.auto_mode():
# if i have available energy and the actual is as good as it gets in the next five hours (with margin) or there is a price spike in the next 5 hours and this is one of the best opportunities...
if (actuals.available_battery_energy > actuals.battery_min_energy) and ((actuals.feedin >= (max(next5hours[0:5]) + self._minimum_margin)) or (available_max_values != None and len(available_max_values) > 0 and actuals.feedin >= min(available_max_values))):
await self.update_status("Discharging battery into Price Spike")
await self.update_status("Discharging into Price Spike")
await self.discharge_battery()
# charge battery if prices rising in the next 2 hours and we will be importing energy at the end of the max period
elif actuals.feedin * 1.2 < max(next5hours[0:6]) and actuals.feedin <= min(next5hours[0:5]) and start_high_prices != None and end_high_prices != None and forecasts.export[end_high_prices] < 0 and actuals.battery_pct_level < 100:
Expand Down

0 comments on commit 1ec1d02

Please sign in to comment.