Not sure what you mean, but the values for Eigenverbrauch and Autarkie are calculated via a rule.
dandjo Sorry, perhaps I wasn’t clear enough. In case of Eigenverbrauch which parameters do you use? There is pvpower, pvselfusetoday, gridpower and gridimporttoday. And what about the parameters for Autarkie?
No worries! Actually none of those four feeds the rings. Both rings in energy-flow-card divide one of today’s energy counters (kWh) by another. Live power isn’t used:
- Eigenverbrauch (self-consumption: how much of today’s PV yield you used yourself) =
pvSelfUseToday/pvEnergyToday - Autarkie (self-sufficiency: how much of today’s home consumption came from PV) =
pvSelfUseToday/homeEnergyToday
The others do different jobs. pvPower and gridPower are live power in W and drive the lines and the moving dots. gridImportToday is only used for the “Bezug … kWh” text under the grid node.
My inverter doesn’t provide pvSelfUseToday or homeEnergyToday, so a small rule calculates them:
pvSelfUseToday= PV yield today − grid export todayhomeEnergyToday= PV yield today − grid export today + grid import today (sopvSelfUseToday+gridImportToday)
Import and export today are the increases of the meter’s total counters since midnight.
Rule sketch (JS Scripting)
Item names are placeholders and all counters are in kWh. Run it every minute or when the counters change.
const midnight = time.toZDT('00:00');
const pvToday = items.getItem('PV_Yield_Today').numericState;
const exportToday = items.getItem('Meter_Export_Total').persistence.deltaSince(midnight, 'influxdb');
const importToday = items.getItem('Meter_Import_Total').persistence.deltaSince(midnight, 'influxdb');
if (pvToday !== null && exportToday !== null && importToday !== null) {
const selfUse = pvToday - exportToday.numericState;
items.getItem('PV_SelfUse_Today').postUpdate(selfUse.toFixed(3) + ' kWh');
items.getItem('Home_Energy_Today').postUpdate((selfUse + importToday.numericState).toFixed(3) + ' kWh');
}
If you want the rings somewhere else, flow-share-ring takes any two values. It’s an SVG element, so it has to sit inside an svg, like it does in the flow card:
component: widget:flow-share-ring
config:
x: 40
y: 40
title: Autarkie
part: =Number(items.PV_SelfUse_Today.numericState) || 0
whole: =Number(items.Home_Energy_Today.numericState) || 0
The ring stops at 100 % and shows 0 while whole is 0, for example before sunrise.
dandjo, great many thanks. It’s now clear. I still need to setup Eigenverbrauch and Autarkie, every thing else is working. I have done some mods to your widget and I have added e.g. Analyzer in the rings.

Great work! I have done something similar for my needs. Now Claude code controls my whole OpenHab-installation. For me as a non-developer this has opened up a new dimension of what I can do with OpenHab.
I created two widgets. One for the bathroom where we have a android wallpanel. And one household-overview page that I run on a computer right now. These are two separate widgets that contains everything needed. “Hus” lets me monitor dishwasher, washing machine, lawn mover and solar plant. “Badrum” controls the bathroom speaker and displays other info. I live in Sweden so everything is in Swedish.
I don´t think this the code is useful for anybody else, just let Claude code check your OpenHab-installation and build what you want!
Yes I agree. I used Claude Code in the past few weeks. Now finally have a dashboard that works on my color eInk device (Boox Go Color 7 Gen 2), updating every minute showing the sun & moon pathes calculated and animated for each day.
Here are two snapshots of the simulator page it also created allowing to check the sun & moon path for any day (and using live data for the other parts of page)
I would never been able to create such a nice looking dashboard.
This shows how much power openHab and AI has.
The MCP binding also was extremely helpful in creating new items, creating & cleaning up rules and many more things which I never really felt doing because it was boring and tedious but now with AI it is fun and the results are amazing.
Very cool. With claude/mcp try a prompt like ‘scan my openhab system and recommend optimizations, corrections, and cleanup with the objective of improving overall performance’
Provided a listing of everything from old unused objects to suggestions on thing polling times based on usage, rules optimizations, etc..








