Series: Part 8/10

Home Assistant Energy Management: Energy Dashboard, Smart Plugs, and Tariff Tracking.

Set up the Home Assistant Energy dashboard: grid, solar, battery, gas and water, smart plugs, time-of-use tariffs and costs, plus energy-saving automations.

Quick Jump to Sections (Table of Contents)16 sections
01What Is Home Assistant Energy Management?02The Basics: Power vs. Energy03Sensor Requirements04Getting to Know the Energy Dashboard05Measuring Grid Consumption06Time-of-Use Tariffs in Home Assistant07Solar Panels08Home Batteries09Per-Device Consumption: Smart Plugs10Gas and Water11Using Energy Data on Dashboards12Automations That Save Energy13Fixing Statistics14Troubleshooting15Frequently Asked Questions16What's Next

Home Assistant Energy Management: Energy Dashboard, Smart Plugs, and Tariff Tracking

Series: Smart Home with Home Assistant — Part 8 of 10
Level: Intermediate
Reading time: About 24 minutes
Last verified: November 19, 2026 (Home Assistant 2026.11.2)

When the electricity bill arrives, most of us only look at the total. We usually don't know which appliance uses how much, what devices left on standby cost per month, or whether switching to a time-of-use tariff would pay off.

Home Assistant's energy management exists to answer exactly these questions. In Part 7, we designed dashboards; in this part, we focus on one of Home Assistant's most useful built-in dashboards: Energy.

In this part we will:

  1. Clear up the difference between power and energy
  2. Learn which sensors the Energy dashboard accepts
  3. Look at ways to measure grid consumption and the safety rules involved
  4. Model a time-of-use tariff (day, peak, night) in Home Assistant
  5. Add solar, home battery, gas, and water tracking
  6. Track per-device consumption with smart plugs
  7. Use the Energy dashboard improvements released throughout 2026
  8. Build automations that save money and energy

What Is Home Assistant Energy Management?#

Home Assistant energy management is a built-in feature that shows the energy flowing into and out of your home on a single dashboard. The Energy dashboard can show electricity drawn from the grid, solar production, home battery charge, and appliance use, and it supports electricity, gas, and water. For each, usage is grouped into what you consume, produce, and store. You can start with a single source and add more over time (Home Assistant — Home energy management).

Data can come from energy monitors, smart plugs, solar inverters, and utility meters, as long as they integrate with Home Assistant (Home Assistant — Home energy management). The principle we've emphasized throughout this series applies here too: your data stays local, and you don't depend on a manufacturer's cloud app.


The Basics: Power vs. Energy#

Most Energy dashboard problems come from mixing up these two concepts.

  • Power: How fast energy is transferred. Measured in watts (W) or kilowatts (kW).
  • Energy: How much energy has been transferred. Commonly measured in kilowatt-hours (kWh).

The official documentation uses a speed and distance analogy: power is how fast you're traveling; energy is the distance driven. Mathematically, energy is the integral of power over time (Home Assistant — Energy FAQ).

A practical example: a 2,000 W kettle running for 30 minutes uses (2\ \text{kW} \times 0.5\ \text{h} = 1\ \text{kWh}). Your bill is based on kWh, which is why the Energy dashboard works in kWh.

Reminder: If a smart plug's app shows "1,500 W," that's a power value, an instantaneous reading. What matters for your bill is the energy sensor, the total of that power over time.


Sensor Requirements#

The Energy dashboard only lists sensors with the right attributes (Home Assistant — Energy FAQ):

Typedevice_classstate_class
Electrical energyenergytotal or total_increasing
Gasgastotal or total_increasing
Waterwatertotal or total_increasing
Instantaneous power (Now view)powermeasurement

Supported units depend on the device class. For example, energy accepts units like Wh, kWh, and MWh, while gas accepts L, m³, ft³, and CCF. Gas measured in kWh is an energy sensor, not a gas sensor (Home Assistant Contributors — Sensor entity).

The state_class difference (Home Assistant — Sensor):

  • total_increasing: A counter that only goes up and may reset occasionally; most energy meters work like this.
  • total: An amount that can go up and down, such as the energy going into and out of a home battery.
  • measurement: A value right now, like a temperature or the current power use.

My sensor isn't in the list

If the dashboard doesn't show a sensor, the usual causes are (Home Assistant — Energy FAQ):

  1. The entity isn't a sensor (for example, it's an input_number). You need to create a template sensor from it first.
  2. The sensor has statistics errors. Check it at Settings > Tools > Statistics.
  3. It's missing required attributes or a supported unit.

You can fix missing attributes with a Template sensor helper that copies the value and carries the correct attributes. The documentation recommends float(none) in the template so it keeps working while the source has no value, for example while Home Assistant starts (Home Assistant — Energy FAQ):

template:
  - sensor:
      - name: "Garden water meter"
        unit_of_measurement: "m³"
        device_class: water
        state_class: total_increasing
        state: "{{ states('sensor.garden_water_meter_raw') | float(none) }}"

The same page recommends opening an issue against the integration that provides the sensor, so the permanent fix lands in the integration itself (Home Assistant — Energy FAQ).

The sensor's value also has to be recorded by the Recorder; otherwise it won't appear in the drop-down (Home Assistant — Electricity grid).


Getting to Know the Energy Dashboard#

The Energy dashboard changed quite a bit in 2026. In 2026.3, the second tab was renamed from Energy to Electricity, since the dashboard covers electricity, gas, and water. The energy settings page was split into three tabs: Electricity, Gas, and Water. The Now view gained badges for real-time power, gas flow, and water flow, plus a water Sankey chart (Home Assistant 2026.3).

Cards

You can also place the Energy dashboard's cards on other dashboards (Home Assistant — Energy cards):

CardYAML typeWhat it shows
Energy usage graphenergy-usage-graphEnergy consumed and its sources; energy returned to the grid
Energy distributionenergy-distributionEnergy flow from the grid and solar to the home, and back to the grid
Energy sources tableenergy-sources-tableEnergy per source and, if set up, costs
Devices energy graphenergy-devices-graphPer-device usage, sorted by usage
Energy Sankeyenergy-sankeyFlow from sources to consumers, grouped by floor and area
Power Sankeypower-sankeyReal-time power flow in the home; not affected by the date picker
Power consumption badgepower-totalThe home's current total power use
Self-sufficiency gaugeenergy-self-sufficiency-gaugeHow dependent the home is on the grid
Date pickerenergy-date-selectionWhich period all energy cards show; compare with the previous period

Sankey cards group devices by floor and area. Devices not in any floor or area are combined into an Other node (Home Assistant — Energy cards). If you set up areas and floors properly in Part 3, the Sankey chart becomes an energy map of your home.

Which cards to show

Under Settings > Dashboards > Energy > Edit dashboard, use Customize cards to turn each card on or off. The choice applies to the whole system, not just your browser or user (Home Assistant — Home energy management).


Measuring Grid Consumption#

The foundation of energy management is knowing your home's total electricity use. There are several ways to get it.

Option 1: CT clamp meters

Current transformer (CT) clamp sensors measure the current through a wire to calculate energy use. The official documentation recommends the Shelly EM as an off-the-shelf solution: it has a local API, pushes updates to Home Assistant, and has a high-quality integration. You can also build your own with ESPHome's CT Clamp component or energy meter chips like the ATM90E32 (Home Assistant — Solar panels).

Electrical safety warning: Installing CT sensors requires opening your electrical panel. This work should be done by someone familiar with electrical wiring and may require a licensed professional in some regions (Home Assistant — Electricity grid). In many countries, the meter and its seals belong to the utility or network operator; never tamper with the meter or sealed areas.

Option 2: Reading the meter's LED

Most electronic meters blink a small light each time a fixed amount of energy is used. The Home Assistant Glow project, developed by the Home Assistant team, watches that light and brings it into Home Assistant as a consumption sensor (Home Assistant Blog — Energy Management). It works without touching the meter; you just stick an optical sensor over the LED.

Note: Your meter shows a value like "imp/kWh" (for example, 1000 imp/kWh), meaning how many times the LED blinks per kWh. You need to enter this value correctly in Glow or a similar ESPHome project. If your meter has no such LED or value, this method won't work.

Option 3: Smart meter ports

Meters in the Netherlands, Belgium, and Luxembourg have a standardized P1 port that provides real-time data; ESPHome-based readers like SlimmeLezer+ use it (Home Assistant — Electricity grid). Some countries' meters have HAN ports, read by devices like the Bitvis Power Hub, whose integration arrived in 2026.10 (Home Assistant 2026.10).

Regional note: Which ports your meter offers, and whether you're allowed to connect to them, depends on your country and utility. Where there's no standard port, a CT meter in the panel or an LED reader on the meter is usually the most practical route. Check your meter model and your utility's rules before connecting anything to the meter.

Adding the grid to the dashboard

  1. Go to Settings > Dashboards > Energy.
  2. Under Electricity grid, select Add grid connection.
  3. Select the statistic that represents energy consumed from the grid.
  4. If applicable, select the statistic for energy returned to the grid.
  5. Optional: to show real-time power, set Type of power measurement and select your power sensor. With Two sensors, pick one for power imported from the grid and one for power exported.
  6. Save.

(Home Assistant — Electricity grid)

The power sensor adds real-time and historical power views; energy totals work without it (Home Assistant — Electricity grid). Since 2026.2, you can use a single sensor with inverted polarity, or two separate positive sensors for import and export, without a template sensor (Home Assistant 2026.2). Since 2026.6, you can give grid, solar, battery, gas, and water sources custom names like "Main meter" or "Solar export" (Home Assistant 2026.6).


Time-of-Use Tariffs in Home Assistant#

Many utilities offer time-of-use (TOU) tariffs, where the price per kWh depends on the time of day or day of week. Common structures include a two-tier model (peak / off-peak, such as North American TOU plans or the UK's Economy 7) and a three-tier model (day / peak / night):

PeriodTypical PurposeExample Windows
Day / Mid-PeakStandard daytime consumptionMorning & daytime hours
PeakHighest evening demand & rateLate afternoon / early evening
Night / Off-PeakLowest rate overnightOvernight / early morning

Regional note: Tariff windows and seasonal rules vary widely by country and utility. For example, in North America, utilities typically split rates into Peak and Off-Peak windows (often 16:00–21:00 peak in California/NEM 3.0 plans); in continental Europe and the UK, Economy 7 or dual-rate plans emphasize overnight off-peak pricing; and in Turkey, energy regulator EPDK defines three standard permanent-clock windows (06:00–17:00 Day, 17:00–22:00 Peak, 22:00–06:00 Night — EPDK). Check your contract or utility bill before entering schedule triggers.

About prices: Unit prices change regularly and differ by supplier, so we don't list any here. Take current prices from your contract or bill, and confirm which periods your meter actually uses.

Approach: One meter per period

The official documentation recommends adding one grid connection per tariff when your provider uses multiple tariffs, each with its own consumption statistic. Because the power sensor measures the whole meter, you only add it to one of them (Home Assistant — Electricity grid).

If your meter doesn't already provide a separate sensor per period, the Utility Meter helper does it for you. It tracks a source sensor, resets on a cycle you choose (daily, monthly, and so on), and creates a separate sensor for each tariff you define. With tariffs defined, a select entity shows the current tariff and lets you change it; switching is done with an automation (Home Assistant — Utility Meter).

Set it up in the UI under Settings > Devices & services > Helpers > Create helper > Utility Meter (Home Assistant — Utility Meter).

In YAML, adapting the official example to three periods:

utility_meter:
  monthly_electricity:
    source: sensor.home_total_energy
    name: Monthly electricity
    cycle: monthly
    tariffs:
      - day
      - peak
      - night

This creates sensor.monthly_electricity_day, sensor.monthly_electricity_peak, and sensor.monthly_electricity_night, plus a select.monthly_electricity entity (Home Assistant — Utility Meter).

An automation that switches the tariff by time, based on the structure of the official example (Home Assistant — Utility Meter):

alias: "Energy - Switch tariff period"
mode: single
triggers:
  - trigger: time
    at: "06:00:00"
    variables:
      tariff: "day"
  - trigger: time
    at: "17:00:00"
    variables:
      tariff: "peak"
  - trigger: time
    at: "22:00:00"
    variables:
      tariff: "night"
actions:
  - action: select.select_option
    target:
      entity_id: select.monthly_electricity
    data:
      option: "{{ tariff }}"

A gap to close: This automation only runs when the clock hits each time. If Home Assistant restarts or is down at exactly 17:00, the switch can be missed. Adding a homeassistant start trigger and a choose block that picks the correct period for the current time is a good idea; the building blocks from Part 6 make this straightforward.

Then add three separate grid connections in the Energy dashboard: the day, peak, and night sensors, each with its own unit price. Add the power sensor to only one of them.

Don't do this: Don't sum the period sensors with a template or Group helper and add that single sensor to the dashboard. The sensors won't reset at exactly the same moment, so the sum briefly reports a false value that gets recorded in long-term statistics and has to be fixed by hand. Add each sensor as a separate source (Home Assistant — Utility Meter, Home Assistant — Energy FAQ). You can fix already-recorded bad data at Settings > Tools > Statistics.

Cost options

When adding a grid connection, you choose how to track costs. The options in the UI are:

  • Use a static price: Enter a fixed unit price per kWh. The simplest method; with one connection per period, give each its own price.
  • Use an entity with current price: Pick an entity that shows the current unit price. Suited to hourly or dynamic pricing; the official Nord Pool documentation recommends this option for dynamic prices on the Energy dashboard (Home Assistant — Nord Pool).
  • Use an entity tracking the total costs: Pick an entity that calculates the total cost itself.

Practical tip: Because tariffs change often, consider creating an input_number helper per period to hold the price, then exposing it through a template sensor for the Use an entity with current price option. When prices change, you just update the number on a dashboard. The Energy dashboard doesn't accept input_number entities directly, so you need the template sensor in between (Home Assistant — Energy FAQ). We haven't measured this approach on an installation; compare the first month against your bill to check how price changes are reflected in historical data.

Don't expect an exact match with your bill: Bills usually include network charges, taxes, and fees on top of the energy price. Home Assistant's cost is only as accurate as the unit price you enter. If you enter an all-inclusive unit price, the result gets close to your bill, but small differences due to meter accuracy and reading dates are normal.


Solar Panels#

If you have solar panels, Home Assistant needs to know how much energy is produced. Some inverters have APIs Home Assistant can read; otherwise, you can measure production with CT meters (Home Assistant — Solar panels). The Modbus improvements in 2026.9 and new integrations like KACO Modbus in 2026.10 make it easier to read inverters over the local network without a cloud (Home Assistant 2026.9, Home Assistant 2026.10).

Production forecast: Forecast.Solar

The Forecast.Solar integration estimates production by combining your panels' location, tilt, and size with historic averages and weather data (Home Assistant — Forecast.Solar).

What it needs:

SettingDescription
LocationLatitude and longitude of the panels
Declination (tilt)0 is flat, 90 is fully upright
Azimuth (direction)0 north, 90 east, 180 south, 270 west
Total Watt peak powerCombined peak power of all panels (Wp)

The free service supports a single plane and updates hourly; accounts with an API key update every 30 minutes, and more than one plane requires a paid account (Home Assistant — Forecast.Solar). In the northern hemisphere, south-facing panels have an azimuth around 180.

To add the forecast, go to Settings > Dashboards > Energy, select your solar production entry, turn on the forecast option, and select Forecast.Solar. The dashboard overlays expected production on the solar graph (Home Assistant — Forecast.Solar).

Sensors like "remaining production today" and "highest power peak time" are very useful in automations; we'll use them in the scenarios below.


Home Batteries#

With a home battery, Home Assistant needs to know the energy flowing into and out of it. Some vendors, such as Tesla Powerwall, have an API (Home Assistant — Home batteries).

Battery improvements in 2026:

  • 2026.6: You can connect the battery's state-of-charge (percentage) sensor directly in the Energy settings. The Battery node on the energy distribution card shows the current charge level, and a battery badge appears at the top of the panel (Home Assistant 2026.6).
  • 2026.10: The energy usage graph shows each battery's discharge separately, as it already did for charging (Home Assistant 2026.10).

Per-Device Consumption: Smart Plugs#

Knowing the total is a good start, but the real insight comes per device: how much does the fridge really use, what does the gaming PC draw on standby, how much of the bill is the space heater?

Smart plugs sit between the device and the outlet and measure the energy flowing through. Depending on the protocols you use, you can choose Zigbee, Z-Wave, or Wi-Fi plugs (Home Assistant — Individual devices). As covered in Part 4, Zigbee plugs also strengthen the mesh as routers.

Safety: Check the maximum load the smart plug can handle. Don't plug high-power devices like space heaters, ovens, or air conditioners into a plug that isn't rated for them. For those, use plugs rated for high current or meters installed in the panel.

2026.11: From power to energy in one step

The Energy dashboard works in kWh, but many devices only report power in watts. Previously, you had to set up a sensor that adds up power over time before adding such a device. Since 2026.11, when you add an individual device, solar panels, or home consumption with only a power sensor, Home Assistant offers to derive the energy sensor when you save, or to reuse one derived from the same sensor earlier. Gas and water work the same way with flow rate sensors (Home Assistant 2026.11).

Steps (Home Assistant — Energy FAQ):

  1. Go to Settings > Dashboards > Energy.
  2. Add an individual device, solar panels, home consumption, gas, or water, and select the power or flow rate sensor.
  3. Select Save. A dialog suggests a sensor that can be created from the one you selected; if one derived from the same sensor already exists, it lists that instead.
  4. Select Create, or Use sensor.

The created sensor is an Integration (Riemann sum integral) helper and appears under Settings > Devices & services > Helpers. New sensors start counting when you create them; earlier values aren't included (Home Assistant — Energy FAQ).

Setting up the Integral helper yourself

To choose the sensor's settings yourself, create the Integral helper first and then add it as an individual device (Home Assistant — Individual devices). Key settings (Home Assistant — Integral):

SettingDescription
Methodtrapezoidal is most accurate for frequently updating sources. left is preferred for loads that stay constant for long periods and change abruptly (like a resistive heater)
unit_prefixWith k, a source in W becomes kWh
roundNumber of decimal places
max_sub_intervalForces a calculation at least this often, even if the source doesn't change
sensor:
  - platform: integration
    source: sensor.office_heater_power
    name: Office heater energy
    unit_prefix: k
    method: left
    round: 2
    max_sub_interval:
      minutes: 5

This is the official example with method: left added; for a heater that switches on and off, left fits better (Home Assistant — Integral). A Riemann sum is inherently an approximation; the more often the source updates, the more accurate the result.

Avoiding double counting: Upstream devices

You can build a hierarchy by setting one device as another's "upstream device." For example, if a CT sensor measures the kitchen circuit and the fridge is also measured by a smart plug, set the kitchen circuit as the fridge's upstream device so Home Assistant doesn't count the fridge twice. All related entities must first be added as individual devices; only devices already in the list can be picked as upstream (Home Assistant — Individual devices).

Total home consumption and untracked usage

Since 2026.11, you can add your home's total consumption to the Energy dashboard, and the legends of the power and device graphs show the current value of each source (Home Assistant 2026.11). Subtract the sum of your measured devices from the total, and what's left is consumption you're not measuring yet. If that share is large, it tells you where to put your next smart plug.


Gas and Water#

Gas

For homes on a gas grid, the gas meter is usually the best data source (Home Assistant — Gas). Methods mentioned in the official documentation:

  • Pulse counting: Some diaphragm gas meters have a rotating magnet that can be detected externally; a reed switch or magnetic sensor can count the rotations. Inexpensive magnetometers supported by ESPHome, like the QMC5883L and HMC5883L, can be used for this.
  • AI on the edge: This project runs on an ESP32-CAM, photographs the meter display, reads the digits, and sends them to Home Assistant over MQTT. It works with gas, water, and electricity meters.

(Home Assistant — Gas)

Regional note: Gas meters usually belong to the gas network operator, and some are prepaid card meters. Don't tamper with the meter body or sealed parts. Camera-based display readers are the safest option because they don't touch the meter; for pulse counting, first check the manufacturer's documentation to confirm your meter has a magnet or pulse output.

If your boiler integrates with Home Assistant but only reports burner time or modulation rather than gas use, you can't measure real consumption. Estimates are possible, but they shouldn't be presented as measurements.

Water

For water, you can use smart water meters, inline flow meters for specific appliances, or smart washing machines and dishwashers that report their own water use (Home Assistant — Individual devices). The upstream hierarchy works for water too: link the main line meter and the washing machine meter to avoid double counting (Home Assistant — Individual devices).

The Energy dashboard offers a water consumption graph, a historical water Sankey, and a water flow Sankey showing current flow (Home Assistant — Energy cards). Combined with the automations from Part 6, live flow data is a powerful leak detection tool: if water has been flowing for a long time while nobody is home, something is wrong.


Using Energy Data on Dashboards#

You can use energy cards not only on the Energy dashboard but also on the dashboards we designed in Part 7. They're in the Energy cards section of the card picker (Home Assistant — Energy cards).

All energy cards on a dashboard are linked to the same date picker. To show different date ranges on one dashboard, link the cards to different collections with collection_key; the value must start with energy_ (Home Assistant — Energy cards):

type: energy-date-selection
collection_key: energy_this_week

The distribution card introduced in 2026.2 shows how values are distributed across several entities as a proportional horizontal bar. It's ideal for seeing which circuit or appliance draws the most power right now, and it only lets you combine entities of the same domain and device class (Home Assistant 2026.2).


Automations That Save Energy#

Measuring is the first step; the real gain comes from changing behavior based on what you measure. The scenarios below use the modern syntax from Part 6. Entity IDs are examples.

Scenario 1: Washing machine finished

If the washing machine's smart plug reads below 5 W for 3 minutes, send a notification. Power can dip briefly between heating and spinning, so the for duration matters.

alias: "Laundry - Machine finished"
mode: single
triggers:
  - trigger: power.crossed_threshold
    target:
      entity_id: sensor.washing_machine_power
    options:
      threshold:
        type: below
        value:
          number: 5
          unit_of_measurement: "W"
      for: "00:03:00"
conditions:
  - condition: template
    value_template: >
      {{ trigger.from_state is not none and
         trigger.from_state.state not in ['unknown', 'unavailable'] }}
actions:
  - action: notify.mobile_app_my_phone
    data:
      title: "Laundry done"
      message: "Don't forget to empty the machine."
      data:
        tag: "laundry-done"

Note: We wrote power.crossed_threshold with the same structure as the temperature.crossed_threshold trigger used in Part 6; it's listed in the official trigger reference (Home Assistant — Triggers). Verify the W unit in the visual editor on your own system. Thresholds and durations vary by machine; watch your machine's standby power for a few days and adjust.

Scenario 2: Night tariff reminder for the dishwasher

On a time-of-use tariff, shifting heavy loads to the cheapest period saves money. If the dishwasher isn't smart, at least send a reminder:

alias: "Energy - Night tariff started"
triggers:
  - trigger: time
    at: "22:00:00"
conditions:
  - condition: zone.occupancy_is_detected
    options:
      zone: zone.home
actions:
  - action: notify.mobile_app_my_phone
    data:
      title: "Night tariff started"
      message: "Now is a good time to run the dishwasher and washing machine."

Adjust the time to your own tariff. If your appliance can be started remotely from Home Assistant, use the actionable notification pattern from Part 6 to ask "Start it now?" instead.

Scenario 3: Cutting standby consumption

TVs, game consoles, and speakers can draw power even when "off." When nobody is home, turn off the smart plugs they're on:

alias: "Energy - Home empty, cut standby"
triggers:
  - trigger: zone.occupancy_cleared
    options:
      zone: zone.home
      for: "00:15:00"
actions:
  - action: switch.turn_off
    target:
      label_id: standby_cut_ok

This uses labels from Part 3: give the "standby cut OK" label only to plugs that are safe to switch off. Never give it to the fridge, the router, or the Home Assistant server's plug.

Measure first: How much this saves depends on your devices. Watch the plugs for a few days to see how much the devices really draw when off. Claiming "this saves X" without measuring would be misleading.

Scenario 4: High instantaneous consumption alert

If the oven, kettle, and air conditioner run at once, you may trip a breaker or pay peak prices. Alert when total power stays high:

alias: "Energy - High consumption alert"
mode: single
triggers:
  - trigger: power.crossed_threshold
    target:
      entity_id: sensor.home_total_power
    options:
      threshold:
        type: above
        value:
          number: 5000
          unit_of_measurement: "W"
      for: "00:05:00"
actions:
  - action: notify.mobile_app_my_phone
    data:
      title: "High electricity use"
      message: "The home has been drawing more than 5 kW for 5 minutes."

Set the threshold based on your contracted capacity and breaker ratings.

Scenario 5: Making use of surplus solar

If you have solar and the remaining forecast for today is high, send a reminder or shift flexible loads like water heating to midday:

alias: "Solar - Plenty of production expected"
triggers:
  - trigger: time
    at: "09:00:00"
conditions:
  - condition: numeric_state
    entity_id: sensor.energy_production_today_remaining
    above: 15
actions:
  - action: notify.mobile_app_my_phone
    data:
      message: >
        About {{ states('sensor.energy_production_today_remaining') }} kWh
        of solar production is expected today. Consider running laundry at midday.

The sensor name is an example; use your installation's ID for Forecast.Solar's "Estimated energy production - remaining today" sensor (Home Assistant — Forecast.Solar).


Fixing Statistics#

A wrong sensor setting, a plug that resets, or the summed-sensor mistake described above can create sudden spikes in statistics. At Settings > Tools > Statistics, you can select a statistic and correct the bad hourly value (Home Assistant — Energy FAQ). Take a backup before doing this; we'll cover backup strategies in detail in Part 9.


Troubleshooting#

ProblemLikely causeFix
Sensor not listed in Energy settingsWrong device_class / state_class, not a sensor, or statistics errorsCheck attributes; look at Settings > Tools > Statistics; create a template sensor if needed
I only have a power sensor in WThe Energy dashboard needs kWhIn 2026.11, create a derived sensor when saving, or set up an Integral helper
The derived sensor has no historyNew sensors start counting when createdThis is normal; past power data isn't converted to energy
A big spike in the graphSummed utility meter sensors or a resetting meterAdd sensors as separate sources; fix the statistic
A device is counted twiceNo upstream hierarchy definedSet upstream devices for child devices
Lots of "Other" in the SankeyDevices aren't assigned to areas or floorsAssign devices to areas
Cost shows as zeroNo cost option selected, or the cost sensor isn't recordedCheck the cost setting; if you filter the Recorder, include the related sensors
Tariff period switches at the wrong timeThe automation was missed, or the meter clock differsAdd a start trigger; confirm your meter's periods from your bill
Smart plug values are inconsistentThe plug's counter reset on rebootCheck the periodically_resetting option in Utility Meter (Home Assistant — Utility Meter)

Frequently Asked Questions#

What's the cheapest way to start tracking energy?
A few smart plugs on the appliances you're most curious about. For the whole-home total, an LED reader on the meter or a CT meter in the panel is the next step.

Will Home Assistant calculate my bill exactly?
No, it produces an estimate. Its accuracy depends on your meter's precision and whether the unit prices you enter include taxes. Compare it with your bill and adjust.

Will a time-of-use tariff save me money?
It depends on how much of your consumption falls in each period. Measure your consumption per period with Utility Meter for a few weeks, then compare both options using current prices. Deciding with measured data is far more reliable than guessing.

Does the smart plugs' own consumption matter?
Each plug has a small standby draw of its own. If you use dozens, factor that in; measuring very low-consumption devices with a plug doesn't always make sense.

Where is my data stored?
Energy statistics are stored in your Home Assistant database, locally. In Part 10, we'll export this data to InfluxDB or PostgreSQL and analyze it in more depth with Grafana.

I don't have solar panels. Is the Energy dashboard useful to me?
Absolutely. Grid consumption, per-device usage, and gas and water tracking alone give valuable insight.


What's Next#

You now know how much energy your home uses and where it goes. In Part 9, we'll talk about opening the system up securely and protecting it:

  • Home Assistant Link (formerly Home Assistant Cloud), Cloudflare Tunnel, WireGuard, and Tailscale compared
  • User accounts, multi-factor authentication, and a security checklist
  • Backup strategies: local drives, network storage, and the cloud
  • Disaster recovery: restoring from a backup from scratch
Complete Guide Series (10 Parts)
10/10 parts published

Complete series overview for building an autonomous, privacy-first smart home: