A small tweak to the Predbat Table Card has enabled a really cool new use-case – MINI Predbat table cards!
Github user @stiplady made a request to add a limit to the number of rows the plan returns, for "quick look" style functionality. A pretty easy change, but has unlocked some very cool functionality.
Predbat mini card on a home assistant dashboard
By limiting the number of rows, users can now combine this functionality with custom columns and font size to create a mini Predbat table card on bigger dashboards.
Previous to this, while you could limit the columns, the plan was usually 24 hours long, so at least 48 rows of data – which was not great for dashboards with other cards in place.
Close up of the Predbat Table Card MINI
As you can see in the images above, placing the table card nicely in a dashboard is now super easy!
Here’s the YAML you can use to get started – obviously feel free to customise the YAML to meet your needs according to the spec.
One of the most powerful aspects of Home Assistant is being able to stitch together data from multiple sources to create meaningful insights. In this post, I’ll walk through how I created a sensor that compares the predicted solar generation against the actual solar energy generated by my system, giving me a live percentage difference throughout the day.
This is particularly useful to understand how accurate your solar predictions are, and whether your solar generation is outperforming (or underperforming) expectations as the day progresses.
Why this sensor?
I use Predbat to manage my solar battery charging and discharging logic. One of its inputs is a daily solar PV forecast, which it sources from Solcast (if configured).
While my GivEnergy inverter provides solar generation figures, I’ve found that the SolarEdge integration (via my SolarEdge export meter) provides more accurate daily totals. You can install a SolarEdge integration through Home Assistant if you have this setup. So for this comparison, I use:
Predbat’s detailedForecast attribute from sensor.predbat_pv_today for the expected PV generation in 30 minute slots
SolarEdge’s sensor.solaredge_energy_today as the actual generated PV value
How it works
The custom template sensor does the following:
Iterates over each 30-minute slot in the Predbat detailedForecast.
Sums up all past PV forecasts (based on current time) to create a "so-far" forecast.
Compares that to the actual solar generated today from SolarEdge.
Calculates the percentage difference, showing how far above or below the forecast we are right now.
This is a dynamic sensor, updating as time passes and more of the forecast becomes "in the past."
What it tells me
The resulting percentage gives me a clear sense of solar performance in real time. For example:
If the value is positive, I’m generating more than expected.
If it’s negative, I’m falling behind the forecast.
This can help explain battery decisions, why Predbat may or may not be dispatching energy, and offer insight into Solcast’s accuracy over time. I tend to find, due to the nature of the solarEdge updates, that the PV predicted is always higher than what I have achieved, but slowly throughout the day it catches up. Sometimes I get lucky and outperform the PV prediction!
Predbat’s DetailedForecast attribute
Within the PV prediction entity for today, Predbat provides a DetailedForecast attribute, which is a 30 minute breakdown. My sensor is based on pv_estimate, but you can choose whichever you want, just update the YAML accordingly.
Predbat is brilliant at building smart charging and discharging plans for my home battery system, based on real-time energy costs, predicted house load, and solar forecasts. It uses Solcast data to predict generation and works out the best times to import, export, or hold energy.
But while Solcast takes weather into account when generating its solar forecast, I often found myself wondering why a particular slot was being scheduled a certain way. Was it cloudy? Raining? Very hot? All of these could affect either solar production or battery efficiency.
That’s when I decided to bring weather information directly into the Predbat Table Card.
Why Add Weather to the Table?
Although Predbat itself does not use the weather entity directly, it’s still useful to overlay forecast conditions with the battery plan. This extra context helps me better understand why certain slots are heavy on import or export, especially when the solar forecast looks optimistic but the weather conditions are less than ideal.
By seeing temperature, cloud cover, or rain in each 30-minute slot, I can cross-reference the charging plan with real-world weather, and make sense of some edge-case decisions.
How the Integration Works
The Predbat Table Card supports optional weather and temperature columns through two features I added:
weather-column: shows a weather icon for the slot
temp-column: shows the predicted temperature
rain-column: shows the predicted chance of rain
To enable them, you need a valid forecast-capable weather entity in Home Assistant and to define it using weather_entity.
You can of course rearrange or add more columns like export-column, load-column, or soc-column etc as needed.
Notes on Forecast Compatibility
This feature only works with forecast-style weather entities that follow the Home Assistant spec. Tested working examples include:
weather.met_home (from Met.no)
weather.weatherflow_forecast (from the WeatherFlow integration)
weather.met_office_yourlocation (from the Met Office weather integration)
If the weather forecast does not cover the full duration of the Predbat plan (e.g. forecast ends before the plan does), then no weather icon or temperature will show for those slots.
Colour-Coding and Hover Details
To quickly spot critical conditions, the table applies colour coding:
Red: temperature over 25°C – which could reduce solar panel efficiency
Blue: temperature below 0°C – which could reduce battery efficiency
Each icon also supports mouse-over tooltips, where you can view the detailed weather condition and temperature value.
If you want to try this yourself, grab the latest version of Predbat Table Card and follow the weather column documentation.
One of the most satisfying parts of running a home solar setup is being able to visualise how your system performs compared to the forecast, how its performing financially, and how might it perform in the next few days.
In this walkthrough I’ll explain at a high level how I’ve combined Solcast, Predbat & Octopus Energy integrations, with Bar Card, Apex Charts and more to get a really great looking dashboard. I’ll do a deeper dive on how its all possible soon.
Live PV Overview Using Bar Card
At the top of this section, I use a compact bar-card layout to display:
PV Power: current output from my solar inverter
PV Max: the peak output so far today
Income: estimated real-time value in £/hour based on grid interaction
These are not standard stat cards. They are styled bar-card elements, which give me better layout control and a consistent visual design.
The live PV data (including PV Power and Max) comes from my GivEnergy system, using the excellent GivTCP integration. GivTCP is a local MQTT-based integration that makes real-time data from both the GivEnergy battery and inverter available in Home Assistant. It is fast, reliable, and fully local, which is ideal for anyone running GivEnergy hardware.
The income figure is calculated using a template sensor that combines live import/export power with live tariff rates from the Octopus Energy integration. This gives a real-time estimate of financial benefit, whether from exported power or avoided import during peak rates. It updates every few seconds and is one of the most useful numbers on the dashboard. The bar card also dynamically changes colour, red for import, green for export.
Solar PV Forecast vs Actual Chart
This section is powered by ApexCharts Card and visualises:
Solcast Forecast (grey)
10% Confidence Range (dark grey)
Actual PV Today (orange)
PV from Yesterday (white dotted line)
It provides a live comparison throughout the day. I can instantly see whether production is tracking above or below expectations, and by how much.
The forecast data is retrieved via Predbat. Predbat serves as the bridge between Solcast and Home Assistant, pulling in high-resolution forecasts and exposing them as sensors. I then feed these directly into the chart.
5-Day Forecast Using Bar Card
Just below the chart, I show a 5-day solar forecast using bar-card again. This includes:
The Forecast for today and the next 4 days
Colour-coded bars based on expected total generation
Each bar represents total energy (kWh) for the day, with dynamic colouring applied using templates. Lower days show in red, wheras higher days in orange. I’ve configured these in such a way that it uses entities for max PV values (35 kWh in my case) as well as my "threshold" for minimum (around your average use). This enables the dynamic colour coding of the bars.
How to access and format forecast data from Predbat
Template examples for value display and colour thresholds
Complete YAML for the 5-day bar-card layout
Forecast vs Reality Delta
At the bottom of this section, I include a summary of:
Forecasted PV power for right now
Forecasted PV energy for right now
Percentage difference between the forecast and reality
For example, as of this image I am 38% up on the forecasted PV energy generation today. These numbers dynamically change as the hours go during the day, giving me a strong signal for how much better or worse reality is compared to the prediction.
Predbat from springfall2008 is a fantastic custom integration for Home Assistant that intelligently manages solar battery charging and discharging based on predicted solar generation and energy tariffs. It’s especially helpful for optimising when to charge from the grid or discharge to avoid peak tariffs, and it’s saved me a decent amount on my energy bill.
But like any planning tool, Predbat needs time to generate its plan. Most of the time it does this quickly – but occasionally it can take a little longer. I wanted a way to visualise and track how long Predbat was taking to generate its plan each time it ran.
Why track Predbat’s ON time?
The provided switch.predbat_active entity goes into the on state when Predbat is generating a new plan. Once complete, it switches back to off. By measuring how long it remains ON, I can catch cases where Predbat is taking longer than expected.
If it ever takes more than 5 minutes, I want to know – either through a notification or visually via my dashboard.
Step 1: Creating the Sensor
I used a trigger-based template sensor that calculates the duration in minutes that the switch.predbat_active was ON.
Here’s the YAML for the sensor:
- trigger:
- platform: state
entity_id: switch.predbat_active
from: 'on'
to: 'off'
sensor:
- name: Predbat Last ON Duration
unique_id: predbat_last_on_duration
state: >
{{ (as_timestamp(now()) - as_timestamp(trigger.from_state.last_changed)) / 60 }}
unit_of_measurement: "minutes"
icon: mdi:timer
This sensor will only update when the switch turns OFF. It records how many minutes it was ON – which is effectively how long Predbat took to generate its plan.
Step 2: Visualising ON Durations in ApexCharts
To make this information more useful, I plotted it using the excellent ApexCharts card for Home Assistant.
This renders a neat column chart of how long each plan generation took. The red annotation line at 5 minutes gives a clear visual cue if something is taking too long.
Notifications and Automations
Now that we have this entity, its a simple job to create a notification if the ON time is longer than my desired 5 minutes. Just use the new entity to trigger a notification to home assistant or your mobile device.