Some homegrown home assistant bits and bobs. Feel free to use as you like.
pretty_solcast_apexchart.yaml is code for a Home Assistant Apexcharts chart to present Solcast data nicely. Can't remember where I pinched the original from, so if it was yours, please tell me! Then it's basically just had lots of adding traces and tinkering with opacities.
To use, just paste into a new Apexcharts card. For the actual generation trace you'll need to replace the xxxxxxxxxx with your own inverter's serial number in the givtcp entities (2 places, towards the end of the file).
Uses the 24hr forecast temperatures from the Met.no integration to calculate predicted heat pump usage, formatting the result in a form suitable for input to Predbat's Load Forecast input. See also some discussion here.
Plot your HP's total energy consumption vs daily average outside temperature in your favourite spreadsheet app. For my Vaillant Arotherm, all of this info is available from the myVAILLANT app. You'll want a decent spread of data for this, though you can always update it as you go - I started with a month or so's data back in Feb/March, but the warm part of the chart has filled out nicely over the summer - we'll see how the left-hand side fills out this winter. If you don't have an outdoor temperature sensor as part of your heat pump setup, you can get reasonable results from a nearby weather station - try something like Wunderground.
Fit a trendline. Quadratic was the best-looking fit for me. Show the equation, and note the three coefficients (a, b and c, from y = ax^2 + bx + c), being careful of +/- signs.
Grab the template from HP_energy_prediction.yaml. Substitute in your coefficients a, b and c in lines 22-24.
Paste the template with your coefficients into your Home Assistant's configuration.yaml.
Find the relevant section in Predbat's apps.yaml, and point it towards your new template:
# Load forecast can be used to add to the historical load data (heat-pump)
# To link to Predheat
# Data must be in the format of 'last_updated' timestamp and 'energy' for incrementing kWh
load_forecast:
- sensor.hp_energy_prediction$HP_Prediction
# - predheat.heat_energy$external
If all has gone well, you should be able to confirm the incoming data in Predbat's new Web UI, in the apps.yaml tab: