Charts in Home Assistant#
GbbOptimizer provides an interactive Battery Forecast chart that can be embedded in a Home Assistant dashboard as an iframe card.
Chart URL#
| |
Where:
<address>— your GbbOptimizer server address (see Server table), without<or><PlantId>— PlantId of your installation<PlantToken>— PlantToken of your installation
If your PlantToken contains a plus sign (
+), replace it in the URL with%2b. If it contains a slash (/), replace it with%2f.
To enable Dark Mode, append &DarkMode=1 to the end of the URL.
URL Builder#
Fill in the fields to automatically generate a ready-to-use address for Home Assistant:
Embedding in Home Assistant#
Copy the generated URL and paste it into a Webpage card (or manually as an iframe):
| |
The chart requires internet access. If Home Assistant is running on a local network without access to external services, the chart will not load.
Alternative — Custom Charts from MQTT Data#
If you prefer to create charts locally, you can use data transmitted via MQTT (see Automation) combined with cards such as:
- ApexCharts Card (HACS)
- Mini Graph Card (HACS)
- Built-in HA history cards
Ready-made package — GBB Forecast Downloader#
A ready-made Home Assistant package is available that automatically pulls the battery SOC forecast from GbbOptimizer via MQTT and exposes it as a sensor for visualization in ApexCharts Card.
The package creates a sensor.gbb_battery_forecast sensor that queries the MQTT API for the forecast every 5 minutes and exposes data in its attributes (timestamps + SOC values). The forecast is displayed as a dashed line on an ApexCharts graph.
Installation:
- Make sure you have the MQTT bridge configured
- Copy the
gbb_battery_forecast.yamlfile to the/config/packages/directory in Home Assistant - Ensure packages are enabled in
configuration.yaml:1 2homeassistant: packages: !include_dir_named packages - Install ApexCharts Card from HACS
- Restart Home Assistant
Full documentation and YAML file: HomeAssistant-pull-forecast-from-GbbOptimizer