optimization based on quarter-hourly prices; use 48h price forecast; small changes to adjust battery capacity and consumption history, bug fix for new version of AppDeamon#20
Merged
CWILDMOUNTAIN merged 16 commits intobullitt186:mainfrom Dec 8, 2025
Conversation
use entso-e as source for energy-prices (kept the name Tibber prices to stay out of trouble with the rest of the code)
Problem: The check for cheapest / expensive hours is only done for the day the forecast is published at 2 p.m. for the same day as it compares now.date and forecast.date. When there are cheap hours e.g. 2-4 p.m. this very day but even cheaper hours from e.g. 11-14h the next day, the script will only pull the cheap hours from 2-4 p.m. but ignore the cheap hours from tomorrow, even if the price is lower the next day. Solution: When the date changes at 0:00 the script will redo the check for cheapest hours on the new day. changes have been made for expensive hours respectively. P.S.: it's the same PR as a few weeks before, linting errors should be fixed by now (I closed the last PR unintentionally)
using https://www.energyforecast.de to get 48h forecast energy prices, so need to fetch data for prices today, tomorrow and day after tomorrow P.S. you need the EPEX SPOT Integration (https://github.com/krombel/ha_epex_spot), the prices sensor in the wattwise.yaml has changed respectively
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes some major changes in the code and the way Wattwise will work.
As energy prices are given in 15min granularity from Epex Spot market it seems logic to do calculation and optimization based on 15 min steps. The following change have been made:
1. Use Epex Spot integration for HomeAssistant as energy price sensor
2. Use more granular Solar Forecast Data and include forecast data of day 3
3. Consumption Forecast
4. Optimization (optimize_battery)
(no changes in the optimization model per se)
5. Cheapest / Expensive Hours
6. configurable inputs of battery capacity, lower battery limit and consumption history days (via HomeAssistant input sensors)
This allows you to easily change the battery capacity former defined in the apps.yaml. This might be helpful in winter if one likes to avoid low discharge and adjust lower battery limit
This allows you to easily change the lower battery limit former defined in the apps.yaml. This might be helpful in winter if one likes to avoid low discharge
This allows you to easily change your consumption history. This might be useful if you go on holiday / come from holiday to reset the consumption history as this is the basis for consumption forecast.
minor bug fixes: