Energy Flow — animated Sankey power-flow widget

# Energy Flow — animated Sankey power-flow widget (solar · grid · battery · loads)

energy_flow_small

A self-contained MainUI widget that shows your live energy as an animated Sankey flow: solar/generators feed a glowing centre hub, grid and battery swap sides depending on whether they are feeding in or drawing out, and an unlimited set of consumers fan out on the right. Flat design, light & dark adaptive, fully configurable, no external dependencies (pure YAML + inline CSS/SVG).

Repo: openhab-binding-emsmanager/widgets/energy_flow at add-energy-flow-widget · stamateviorel/openhab-binding-emsmanager · GitHub

Install: Settings → Widgets → Add from Marketplace, add it to a page, then configure the items/groups (see Setup).

## Features

- Animated flows — only active flows are shown; they fade in and out with usage.

- Dynamic source/sink — grid shows on the left when importing, right when exporting; battery left when discharging, right when charging.

- Unlimited consumers and generators via openHAB Group items — drop an item in the group and it appears automatically, with an auto-assigned colour and a keyword-matched icon.

- Glowing rotating centre hub showing total consumption; spin speed scales with throughput.

- Configurable sign conventions (grid export, battery charge) and W/kW scaling.

- Theme-adaptive, responsive, flat, self-contained.

## Requirements

- openHAB 5.x MainUI.

- Number / Number:Power items for total consumption, grid, optional battery, and each source/load.

- Two Group items — one for generators, one for consumers — filled with your power items.

## Setup

Create two groups and add your power items, for example:

Group gEnergyFlow_Generators "Generators"

Group gEnergyFlow_Consumers  "Consumers"

Number:Power Solar_Power  "Solar [%.0f W]"  (gEnergyFlow_Generators)

Number:Power Boiler_Power "Boiler [%.0f W]" (gEnergyFlow_Consumers)

Number:Power EV_Power     "EV [%.0f W]"     (gEnergyFlow_Consumers)

Then set the generators group, consumers group, grid item, optional battery item and total-consumption item, and check the sign toggles match your meters.

## Configuration

- Generators group — generation items (PV, wind, genset); shown as left inflows.

- Grid power item / Grid label — grid meter and its short name.

- Battery power item / Battery label — battery power and its short name.

- Total consumption item / Centre caption — value and caption in the centre hub.

- Consumers group — load items; shown as right outflows.

- Source / Consumer divisor — 1000 if items are in W, 1 if already in kW.

- Grid sign positive = EXPORT — flip if your grid meter is positive on import.

- Battery sign positive = CHARGING — flip if your battery is positive on discharge.

## Notes

- Default conventions: grid positive = export, battery positive = charging; flip the toggles if your meters differ.

- Icons are auto-picked from keywords in the item name/label (car, light, boiler, heat, air, security, pump, wash, oven, solar, wind, …), otherwise a neutral default. Colours are auto-assigned and distinct.

- Layout stays clean up to about 8 members per side; beyond that they pack tighter into one column.

- Grid and battery are single, bidirectional flows; only generators and consumers are unlimited.

-v1.0.2 ---- small changes

-v1.0.1 — added battery support

- v1.0.0 — initial release.

3 Likes