⚡ Quick Answer

Plug in a Shelly EM (whole-home) or Tapo P115 smart plug (per-device), add it to Home Assistant via its native integration, then go to Settings → Energy and add the kWh sensor as a grid consumption source. You'll have real-time power monitoring, historical charts, and cost estimates within minutes — all running locally with no cloud required.

🛒 What You Need

In This Guide

  1. What you can monitor
  2. Setting up Shelly EM
  3. Setting up Tapo P115
  4. Configuring the HA Energy Dashboard
  5. High-consumption alert automation
  6. Daily cost calculation
  7. Tracking multiple devices
  8. Troubleshooting
  9. FAQ

1. What You Can Monitor: Whole-Home vs Per-Device

Energy monitoring in Home Assistant works at two levels:

Both approaches integrate with HA's built-in Energy dashboard, which tracks hourly/daily/monthly consumption and calculates costs based on your electricity tariff. Most people use both: a Shelly EM for the whole-home picture and a few P115 plugs to identify which specific appliances use the most power.

2. Setting Up Shelly EM (Native Integration)

The Shelly EM connects to your Wi-Fi and communicates with HA over the local network — no cloud needed. Installation steps:

  1. Install the Shelly EM in your electrical panel (by a qualified electrician if you're not comfortable — it involves working near mains voltage). The current clamp goes around the live wire; the device itself connects to a nearby socket for power.
  2. Power it on — it creates a Wi-Fi hotspot. Connect to it with your phone and configure it to join your home Wi-Fi.
  3. In Home Assistant, go to Settings → Devices & Services → Add Integration and search for Shelly. HA will auto-discover Shelly devices on your network.
  4. Click the discovered Shelly EM and complete setup. You'll get entities including sensor.shelly_em_power (watts, live) and sensor.shelly_em_energy (kWh, cumulative).
Tip: The Shelly EM has two channels — you can monitor two circuits. Useful for tracking solar production on one channel and grid consumption on the other.

3. Setting Up Tapo P115 for Energy Monitoring

The Tapo P115 is a smart plug with built-in energy monitoring. It integrates with HA via the TP-Link Tapo integration:

  1. Plug in the P115 and set it up in the Tapo app (requires a TP-Link account for initial setup)
  2. In Home Assistant, go to Settings → Devices & Services → Add Integration → TP-Link Kasa Smart
  3. HA will discover Tapo devices on your network. The P115 creates entities including sensor.tapo_p115_current_consumption (watts) and sensor.tapo_p115_today_energy (kWh for the day)
Note: For fully local control (no TP-Link cloud dependency), you can use the Tapo: Cameras Control HACS integration which communicates directly to the device over your LAN. This is more advanced but means zero cloud traffic.

4. Configuring the HA Energy Dashboard

Home Assistant has a built-in Energy dashboard at Energy (in the sidebar, or /energy). To populate it:

  1. Go to Settings → Energy
  2. Under Electricity grid, click Add consumption and select your kWh sensor — e.g., sensor.shelly_em_energy
  3. Set your electricity price (per kWh) — HA will calculate monetary cost from this
  4. Under Individual devices, add your P115 plugs one by one with their energy sensors

After 24 hours of data collection, the Energy dashboard shows consumption charts, cost breakdowns, and per-device comparisons. It's one of HA's most impressive built-in features.

5. High-Consumption Alert Automation

Get notified when your power usage spikes — useful for detecting if you left something on or catching appliance faults. This automation fires if consumption exceeds 3000W for 5 consecutive minutes:

YAML — high power consumption alert
alias: "High Power Consumption Alert"
trigger:
  - platform: numeric_state
    entity_id: sensor.shelly_em_power
    above: 3000
    for:
      minutes: 5
action:
  - service: notify.mobile_app_my_phone
    data:
      title: "⚡ High Power Alert"
      message: "Power consumption has exceeded 3000W for 5 minutes."
mode: single

Adjust the threshold (3000W) to match your home's typical baseline. A UK home average is ~1000–1500W; 3000W sustained usually indicates multiple high-draw appliances running simultaneously (electric oven + tumble dryer, for example).

Replace notify.mobile_app_my_phone with your actual notification service — found in Developer Tools → Services → notify. If you have multiple phones, you might have notify.mobile_app_sams_iphone or similar.

6. Daily Cost Calculation with Template Sensors

HA's Energy dashboard calculates costs automatically, but if you want a sensor you can use in automations or display cards, create a template sensor:

YAML — configuration.yaml template sensor
template:
  - sensor:
      - name: "Daily Energy Cost"
        unit_of_measurement: "£"
        state_class: total_increasing
        state: >
          {% set kwh = states('sensor.shelly_em_energy_today') | float(0) %}
          {% set rate = 0.28 %}
          {{ (kwh * rate) | round(2) }}

Replace 0.28 with your actual electricity rate per kWh. The sensor sensor.shelly_em_energy_today is the daily kWh counter — check your actual entity names in Developer Tools → States. This sensor resets to £0 whenever the underlying energy sensor resets (typically at midnight).

Tip: The HA Energy dashboard already does this calculation if you enter your tariff in Settings → Energy. Use template sensors when you want the cost figure available as a standalone entity for automations, dashboard cards, or notifications.

7. Tracking Multiple Devices

Add as many P115 plugs as you like — one per appliance you want to track. Good candidates: fridge (baseline always-on load), washing machine, dishwasher, EV charger, home office setup, and gaming PC.

In the Energy dashboard under Individual devices, add each plug's energy sensor. HA will show you a bar chart comparing them, making it immediately obvious which device costs the most to run.

You can also create automations around specific devices — for example, notify when the washing machine finishes (power drops below 5W after being above 500W):

YAML — washing machine done notification
alias: "Washing Machine Done"
trigger:
  - platform: numeric_state
    entity_id: sensor.tapo_p115_washing_machine_power
    below: 5
    for:
      minutes: 2
condition:
  - condition: numeric_state
    entity_id: sensor.tapo_p115_washing_machine_power
    above: 0
    for:
      minutes: 1
    value_template: "{{ trigger.from_state.state | float(0) > 100 }}"
action:
  - service: notify.mobile_app_my_phone
    data:
      title: "🫧 Washing Done"
      message: "The washing machine has finished."
mode: single

8. Troubleshooting

Shelly EM not discovered by HA

Make sure the Shelly is on the same network subnet as HA. mDNS discovery requires devices to be on the same VLAN. Also try manually adding it: in the Shelly integration, click Add Entry and enter the Shelly's IP address directly.

Energy dashboard shows "waiting for data"

The energy sensor must have device_class: energy and state_class: total_increasing (or measurement for power in watts). If your sensor is missing these, add them via Settings → Devices & Services → [your integration] → entity → customize.

P115 power readings seem wrong

Power factor: the P115 measures apparent power, which can differ from real power for inductive loads (motors, some PSUs). This is normal. For most resistive loads (heaters, incandescent bulbs), readings are accurate.

Alert automation fires too often

Add a cooldown: change mode: single to prevent re-triggering while the power is still high, or add a delay action before re-enabling the trigger. The for: minutes: 5 on the trigger already helps — it only fires after sustained high usage.

9. FAQ

Is any of this data sent to the cloud?

The Shelly integration is 100% local. The Tapo P115 via the official TP-Link integration uses local polling — it communicates directly to the plug over your LAN, no cloud needed once set up. If you use the official Tapo app for setup, that does briefly use TP-Link's cloud, but subsequent HA communication is local.

How accurate are clamp-based monitors like the Shelly EM?

Within 1–2% for typical residential loads, which is more than accurate enough for energy monitoring. Certified utility meters have higher accuracy requirements, but for tracking trends and costs, the Shelly EM is very reliable.

Can I track solar production too?

Yes. The Shelly EM's second channel can monitor your solar inverter output. In HA Energy settings, add it as a solar production source. HA will calculate self-consumption and grid export automatically.

What if my electricity has time-of-use pricing?

HA Energy supports multiple price periods. Go to Settings → Energy → Electricity grid → set your peak/off-peak prices and the hours they apply. HA will apply the correct rate to energy consumed in each period.

SmartWired participates in the Amazon Associates Programme. We may earn a commission from qualifying purchases at no extra cost to you.