Piotras Energy Donut
An interactive donut chart for energy distribution and percentage-based monitoring β available in three layouts with full visual editor.
3 layout modes:
- Layout 1: Callout Lines β donut with outward callout lines connecting segments to labels, automatic collision avoidance so labels never overlap
- Layout 2: Legend β donut with a two-sided legend distributed symmetrically left and right of the chart
- Layout 3: Percentage Gauge β dedicated single-value ring for percentage-based sensors (battery, humidity, tank level). Always-on display with optional comfort zone ring
Key features:
- Interactive Focus Mode β click any segment or legend item to isolate it; selected segment enlarges while others fade, showing value and percentage in the chart center
- Auto-reset timer β configurable
detail_timeoutreturns the chart to overview automatically after a click - Callout lines toggle β
show_lines: falsehides lines for a clean look; clicking any segment reveals its line on demand - Configurable display limit β show only the top N devices; the rest are automatically grouped into the βOthersβ segment
- Comfort Zone Ring β Layout 3 supports an optional outer ring divided into three threshold-based color zones (e.g. cold / comfort / hot)
- 20-color custom palette β every segment color individually adjustable via
c1βc20 - Fully responsive β SVG scales cleanly to any card width with proportional ring thickness, radius and font sizes
Visual Editor: Full GUI β manage devices, tweak colors and dimensions without YAML.
Also works great for:
- Live power (W) and current (A) monitoring
- Battery and percentage-based sensors (
layout: 3) - Custom units and precision via
po_opisieandpo_przecinku
Installation
Method 1: Via HACS (Recommended)
- Click the button below to automatically add the repository to your HACS:
- Click Add in the pop-up window.
- Once the repository page opens, click Download.
- After downloading, do a Hard reload of your browser.
Method 2: Manual Installation
- Download this repository as a ZIP file and extract it.
- Inside your Home Assistant
config/www/directory, create a new folder namedpiotras-energy-donut. - Copy the compiled files (from
dist/folder)
intoconfig/www/piotras-energy-donut/. - Go to Settings β Dashboards β Resources.
- Click Add Resource and enter:
/local/piotras-energy-donut/piotras-energy-donut-loader.js?v=1.1.0
- Resource type: JavaScript Module
- Hard reload your browser (
Ctrl+Shift+R).



