Skip to content

Home Assistant Energy Dashboard — Complete Guide

DodaTech Updated 2026-06-24 3 min read

In this tutorial, you'll learn about Home Assistant Energy Dashboard. We cover key concepts, practical examples, and best practices.

Hook

You configure the Energy dashboard in Home Assistant, add your electricity sensor, and expect to see consumption data. Instead, the dashboard shows "No data" or "Waiting for data" for days. Your smart meter is reporting, but the Energy dashboard ignores it.

The Wrong Way

Creating a template sensor that multiplies the power reading by arbitrary factors to "fix" the values introduces inaccuracies that compound over time.

# BAD: Incorrect template sensor for energy
sensor:
  - platform: template
    sensors:
      energy_total:
        value_template: "{{ states('sensor.power') | float * 1000 }}"
        unit_of_measurement: "kWh"
Energy dashboard shows: 45000 kWh/day
Actual consumption: 45 kWh/day
Off by factor of 1000

Incorrect unit and scaling make the energy data useless.

The Right Way

The Energy dashboard needs a sensor that measures energy (kWh), not power (W). If your device reports power, you need to integrate it over time.

# 1. Check what your sensor reports
# Web UI → Developer Tools → States → sensor.power
sensor.power:
  state: 500
  attributes:
    unit_of_measurement: W

The sensor reports power in Watts, not energy in kWh.

# 2. Use the Utility Meter integration to create an energy sensor
utility_meter:
  daily_energy:
    source: sensor.power
    cycle: daily
# 3. Use Riemann sum integral to convert power to energy

sensor:
  - platform: integration
    source: sensor.power
    name: "Energy Total"
    unit_prefix: k
    unit_time: h
    round: 2
# 4. In the Energy dashboard, add "Energy Total" as the grid consumption sensor
Energy dashboard showing: Daily consumption 12.5 kWh ✓
# 5. Verify with the device's own reading
# Compare with your physical meter or inverter app

Prevention

  • Use sensors with unit_of_measurement: kWh for the Energy dashboard.
  • If your sensor reports Watts (W), use the Riemann sum integration to convert.
  • Add both grid consumption and solar production sensors for complete tracking.
  • Set cycle: daily or cycle: monthly on utility meters to track tariffs.
  • Calibrate your sensors against your physical electricity meter monthly.

Advanced Troubleshooting

Check the Logs

Most TOOL errors are logged to stdout or a dedicated log file. Check your logs first:

# Check system logs
journalctl -u tool --since "1 hour ago"

# Or check the application log
tail -50 ~/.tool/logs/error.log

Test with a Minimal Example

Create the simplest possible tool configuration to verify the base setup works:

tool --version
tool --help

If the minimal test passes, add configuration options one at a time until you find the breaking change.

Common Configuration Mistakes

  • Using the wrong file path or URL in configuration
  • Forgetting to restart TOOL after changing config files
  • Mixing tabs and spaces in YAML configuration files
  • Setting incorrect permissions on configuration directories

When to Reinstall

If none of the above resolves the issue, consider a clean reinstall:

# Backup your configuration
cp -r ~/.tool ~/.tool.bak

# Remove and reinstall
# Follow the official TOOL installation guide

This ensures you start from a known good state and can isolate the issue.

Common Mistakes with assistant energy

  1. Using return to exit a function early instead of wrapping a pure value in the monad
  2. Mixing let bindings with <- bindings in do notation, producing type errors
  3. Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors

These mistakes appear frequently in real-world HOME code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

What is the difference between power (W) and energy (kWh)?

Power (Watts) is the rate of consumption at an instant. Energy (kWh) is the total consumed over time. 1000 W running for 1 hour = 1 kWh. The Energy dashboard needs kWh sensors.

Can I track gas and water in the Energy dashboard?

Yes — the Energy dashboard supports grid electricity, solar, gas, and water. Each source needs a sensor with the appropriate unit_of_measurement (kWh for gas, m³ or L for water).

Why does my energy sensor show negative values?

Negative energy usually means your solar production sensor polarity is reversed, or your smart meter reports feed-in as a negative value. Use absolute or adjust the sensor's math in a template.


DodaTech — energy tracking that adds up.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro