Latest

Measuring home energy use with Home Assistant Energy: sensors, current clamps, time-of-use tariffs and metering plugs

Home Assistant's Energy dashboard shows how much you use, when and on what, but only if it gets the right data. Which meters to use, the difference between power and energy, how to turn watts into kWh, how to split consumption by tariff and the mistakes that make the charts useless.

By 4 min read
Measuring home energy use with Home Assistant Energy

Your bill tells you how much you used in a month, not why. Home Assistant’s Energy dashboard shows consumption hour by hour, separates grid from solar and shows which appliances weigh the most. But it only works with correct data: the most common problem is not the dashboard but the wrong sensors. Here is what to install and how to set it up.

Power and energy: the distinction that matters

Quantity Unit What it tells you Used by Energy?
Power W or kW How much you are using right now No, only as a basis for calculation
Energy Wh or kWh How much you used over time: what you pay for Yes

The Energy dashboard only accepts energy sensors with device class energy and state class total or total_increasing, i.e. counters that grow over time. If your meter only reports power in W, you need to turn it into energy (see below).

Which meters to use

What to measure Typical device Notes
Whole-home consumption A meter with a current clamp in the consumer unit, Wi-Fi or Zigbee The clamp goes around the live cable without cutting it, but installation in the consumer unit must be done by an electrician
Smart utility meter Devices that read the meter’s local data port (P1 in some countries, Chain 2 in Italy) Reads data straight from the utility meter, no clamps
Solar The inverter integration or a second clamp on the inverter output Many inverters have an official Home Assistant integration
Individual appliances Smart plugs with energy metering Washing machine, fridge, TV, computer: check the plug’s maximum rated power
Gas and water Optical or pulse readers on the meter Optional, but the dashboard supports them

For washing machines, ovens and water heaters check that the smart plug can handle the appliance’s power (often 16 A, about 3,500 W in Europe): an undersized plug overheats. For high-power fixed appliances, a meter in the consumer unit is better.

From watts to kWh: the Integral helper

If a device only reports power, create an energy sensor with the Integral (Riemann sum) helper:

  1. Settings > Devices & services > Helpers > Create helper > Integral sensor.
  2. Choose the power sensor in W as the source.
  3. Integration method: left for appliances that switch on and off abruptly (fridge, washing machine), trapezoidal for gradually varying loads.
  4. Metric prefix k and time unit hours: you get kWh.

The new sensor appears among those you can select in the Energy dashboard.

Setting up the Energy dashboard

  1. Open Settings > Dashboards > Energy (or the Energy panel in the sidebar).
  2. Electricity grid: add the grid consumption sensor and, with solar, the energy returned to the grid.
  3. Solar panels: the inverter’s production sensor.
  4. Battery, gas and water if present.
  5. Individual devices: add the smart plugs’ energy sensors.
  6. Costs: enter a fixed price per kWh or a sensor with a variable price.

The dashboard uses long-term statistics: the first data appears after about an hour, and charts become useful after a few days.

Time-of-use tariffs

With a time-of-use tariff it is worth knowing how much you use in each band. The Utility Meter helper splits an energy sensor into several counters, one per tariff:

utility_meter:
  monthly_energy:
    source: sensor.home_energy_total
    cycle: monthly
    tariffs:
      - peak
      - offpeak

An automation then switches the active tariff with select.select_option at the times set in your contract, taking weekends and holidays into account. Check the exact times on your bill before setting them.

Common mistakes

  • A power sensor instead of an energy one: it won’t appear in the dashboard. Use the Integral helper.
  • A counter that resets every time the plug restarts: if the sensor isn’t total_increasing, the dashboard can record spikes or negative consumption. Fix the data from Developer tools > Statistics.
  • Consumption counted twice: don’t add as an “individual device” a meter that already measures a whole circuit containing other metered plugs.
  • Wrong units: Wh mistaken for kWh gives consumption a thousand times too large.
  • A database that grows too big: long-term statistics are light, but exclude from the recorder power sensors that update every second and that you don’t need in history.

What to do with the data

  • Find your night-time baseload: everything that stays on while the house sleeps. It is often 10–20% of consumption and can be cut with smart plugs.
  • Shift the washing machine and dishwasher to solar production hours or cheaper bands, with an automation.
  • Get an alert if an appliance consumes abnormally, for example a fridge that never stops.

For the hardware to run Home Assistant, see Home Assistant on a mini PC or Raspberry Pi 5.

Sources