The Home Assistant energy dashboard is the single most useful feature for anyone trying to reduce their electricity bill. But the setup process trips up a lot of people. Sensors need the right device class. Tariffs need the right format. And if you get it wrong, you stare at an empty dashboard wondering what happened.
This guide walks you through the complete energy dashboard setup from scratch. By the end, you'll have grid consumption, solar production (if applicable), and cost tracking all working correctly.
What You Need Before Starting
Home Assistant 2024.1 or later, and at least one energy monitoring device (P1 meter, Shelly EM, Emporia Vue, or similar). No YAML editing required for the basic setup.
Step 1: Check Your Sensor Requirements
This is where most people get stuck. The energy dashboard is picky about which sensors it accepts. Your energy sensor must have two properties set correctly:
- device_class: energy — tells Home Assistant this sensor measures energy
- state_class: total_increasing — tells it the value only goes up (like a meter reading)
The unit must be kWh (or Wh, which gets converted automatically). If your sensor reports watts (W), that's power, not energy. You'll need to create a Riemann sum integral sensor to convert it.
Check Your Sensors
Go to Developer Tools > States and search for your energy entity. Click on it and check the attributes. You should see:
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
If device_class or state_class is missing, you'll need to fix it. Go to the entity's settings (click the gear icon) and set the device class to "Energy" manually. For state_class, this usually needs to be set by the integration itself—check if your device's integration has been updated.
Converting Power (W) to Energy (kWh)
If you only have a power sensor (watts), add a Riemann sum helper:
- Go to Settings > Devices & Services > Helpers
- Click Create Helper > Integration - Riemann sum integral sensor
- Select your power sensor as input
- Set method to Left and precision to 2
This creates a new kWh sensor that the energy dashboard accepts.
Step 2: Configure the Energy Dashboard
Navigate to Settings > Dashboards > Energy. You'll see sections for electricity grid, solar panels, and home battery storage. Start with the grid—that's the essential one.
Add Grid Consumption
- Under "Electricity grid", click Add consumption
- Select your energy sensor (the one with
device_class: energy) - Choose whether to track cost
If your sensor doesn't appear in the list, go back to Step 1. The dashboard only shows sensors with the correct attributes.
Add Return to Grid (Solar Export)
If you have solar panels and export surplus to the grid, click Add return and select your grid export sensor. This is separate from your solar production sensor—it specifically tracks energy flowing back to the grid.
Step 3: Set Up Tariffs
Tariffs let you track costs accurately. Home Assistant supports three approaches:
Option A: Fixed Rate
The simplest option. Enter your price per kWh (e.g., €0.25) and Home Assistant calculates costs automatically. Good enough for most people.
Option B: Day/Night Tariff
If you have a dual-tariff meter, use the "Use an entity with current price" option. Create a template sensor that returns the correct rate based on time:
template:
- sensor:
- name: "Electricity Price"
unit_of_measurement: "€/kWh"
state: >
{% if now().hour >= 21 or now().hour < 6 %}
0.18
{% else %}
0.28
{% endif %}
Option C: Dynamic Pricing
If you're on a dynamic tariff (Tibber, ENTSO-e, Nordpool), install the relevant integration. It provides a sensor with real-time pricing that the energy dashboard reads automatically.
Step 4: Add Solar Production
If you have solar panels, add your production sensor under the "Solar panels" section. This sensor should also have device_class: energy and state_class: total_increasing.
Most solar inverter integrations (SolarEdge, Enphase, Fronius, Huawei) provide compatible sensors out of the box.
Common Mistake
Don't confuse solar production with grid return. Production is the total energy your panels generate. Grid return is only the portion exported. If you use 3 kWh from solar and export 2 kWh, production is 5 kWh and grid return is 2 kWh.
Step 5: Add Individual Devices
The most powerful part of the energy dashboard is per-device tracking. Under "Individual devices", add smart plugs or circuits that monitor specific appliances:
- Washing machine and dryer
- EV charger
- Heat pump or AC
- Server or home office equipment
This answers the question everyone asks: "Where is my energy actually going?"
Step 6: Wait for Data
After configuration, the energy dashboard needs time to collect data. The first meaningful statistics appear after 2 hours. Full daily comparisons need 24+ hours. Don't panic if the dashboard looks empty immediately after setup.
Home Assistant processes energy statistics on a fixed schedule. Data is compiled into hourly statistics that power the graphs and comparisons.
Troubleshooting Common Issues
Dashboard Shows No Data
- Check sensor attributes (device_class and state_class)
- Verify the sensor has a numeric state (not "unavailable" or "unknown")
- Wait at least 2 hours after initial configuration
- Check Developer Tools > Statistics for errors on your energy entities
Costs Look Wrong
- Verify your tariff sensor unit is €/kWh (not cents)
- Check timezone settings—time-based tariffs use your HA timezone
- For dynamic pricing, ensure the integration updates frequently enough
Spikes in Data
Occasional large spikes usually indicate sensor resets or connectivity drops. Go to Developer Tools > Statistics, find the affected entity, and use "Fix issue" to correct the data.
Want Advanced Dashboards?
This guide covers the built-in dashboard. Our Energy Dashboard Guide includes custom Lovelace cards, cost comparisons, solar self-consumption tracking, and 16 ready-made automations.
View Energy Dashboard GuideWhat's Next
Once your energy dashboard is running, the real value comes from acting on the data:
- Identify high-consumption devices and schedule them during cheap hours
- Track solar self-consumption and optimize battery charging
- Set up energy-saving automations based on real usage patterns
- Compare month-over-month to measure the impact of changes
The energy dashboard turns your smart home from a convenience tool into a money-saving tool. Thirty minutes of setup. Years of data-driven decisions.