Clamp a two-channel Shelly energy meter onto your mains and your geyser circuit, feed it into the Home Assistant Energy dashboard, and get a daily kWh summary plus an alert when something keeps eating units overnight.
Most South African homes find out how much electricity they used in one of two ways: the prepaid meter beeps, or the municipal bill arrives. Neither tells you what used it. Was it the geyser, the pool pump, the old chest freezer in the garage, or the heater someone left on in the spare room?
A small energy meter in the DB board answers that question every minute of the day. This post uses a two-channel Shelly meter: one clamp on the main incoming supply to measure the whole house, and one clamp on the geyser circuit, because the geyser is the appliance most of us suspect first. Home Assistant turns those readings into the built-in Energy dashboard, a daily kWh message on your phone, and an alert when the house keeps drawing power in the middle of the night.
How a clamp meter works
A current transformer (CT) clamp opens and closes around a single wire, so nothing is cut or rewired on the circuit you measure. The meter reads the current through the clamp and the voltage from its own supply, and works out power (watts) and energy (kWh). The Home Assistant docs recommend the Shelly EM as the off-the-shelf CT clamp option, because it has a local API, pushes updates to Home Assistant and has a high-quality integration.
Safety first: this goes inside the DB board
The clamps go around live conductors, and the meter needs its own mains supply, so this part of the job means opening the DB board. Home Assistant's own docs warn that this should be done by someone familiar with electrical wiring and may need a licensed professional. Get a registered electrician to fit it and ask them to check that the board is still compliant afterwards. Everything after that, from the app setup to the dashboards and automations, is pure DIY.
What you need
- A two-channel Shelly energy meter. This post uses the Shelly Pro EM-50 as the example. According to Shelly, it is a DIN-rail, single-phase meter that comes with two 50 A clamps, so one meter covers the whole house and one circuit. Shelly lists the accuracy as ±1% from 5 to 50 A and ±2% below 5 A. It is powered from 100 to 260 V AC, uses under 3 W, and connects over Wi-Fi or Ethernet. The Ethernet port is handy because a metal DB board can weaken Wi-Fi. The manual asks for external protection of at most 2 A on its supply, which your electrician will add.
- A single-phase supply up to 50 A. That covers most homes, but check the main breaker. A three-phase house or a bigger supply needs a different meter.
- Home Assistant on the same network, and the Companion app on your phone for the alerts.

Step 1: Where the clamps go
- Clamp A, the whole house: around the live wire coming from the main switch, before it splits to the circuit breakers. If you have a solar inverter, ask the electrician to clamp the grid feed into the inverter instead, so you measure what you actually buy from the grid.
- Clamp B, the geyser: around the live wire on the geyser breaker. You can pick any one circuit instead: the pool pump, the stove or the plug circuit in the garage.
- Arrow direction: each clamp has an arrow on it. If a reading comes out negative once it is running, the clamp is the wrong way round. Ask the electrician to turn it around.
Step 2: Get it onto your network
Once it is powered, set the meter up with the Shelly app, or connect to its own Wi-Fi access point and open its web page. Shelly's manual says a 5-second press on the button turns that access point on. Join your home network or plug in a network cable, update the firmware, and give it a reserved IP address in your router. Set a clear device name, such as House, and name the channels Mains and Geyser. Home Assistant uses these names for the entities.
Step 3: Add it to Home Assistant
Home Assistant usually discovers Shelly devices on its own. If it does not, go to Settings > Devices & services > Add integration, choose Shelly and enter the IP address. The Shelly integration talks to the device directly on your network, so it does not need the Shelly cloud, and the readings keep working when your internet is down.
You should get a power sensor (W) and an energy sensor (kWh) for each channel. The examples below use sensor.house_mains_power, sensor.house_mains_energy, sensor.house_geyser_power and sensor.house_geyser_energy. Check the real names on the device page and use those.
Step 4: Set up the Energy dashboard
- Go to Settings > Dashboards > Energy.
- Under Electricity grid, choose Add grid connection and select the mains energy sensor as the energy consumed from the grid.
- Optionally, select the mains power sensor for live power views.
- Under Individual devices, add the geyser energy sensor.
You can also turn on cost tracking with a fixed price per kWh. Use the price from your own municipal or Eskom tariff, or the rate on your prepaid slip, because tariffs differ between municipalities and change every year. If you buy on a time-of-use tariff, the Home Assistant Energy FAQ explains how to split your usage by tariff with the Utility Meter helper.
Step 5: Daily and monthly totals
The Energy dashboard is great for browsing, but a few simple totals are easier to use in automations. The Utility Meter helper keeps a counter that resets every day or month. You can create it in the UI under Settings > Devices & services > Helpers, or in YAML:
utility_meter:
house_energy_daily:
source: sensor.house_mains_energy
cycle: daily
geyser_energy_daily:
source: sensor.house_geyser_energy
cycle: daily
house_energy_monthly:
source: sensor.house_mains_energy
cycle: monthly
The docs point out that the first cycle is incomplete, so the daily totals are only right from the next day, and the monthly total from the first of next month.
Step 6: A daily summary on your phone
This automation sends the day's numbers at 21:00. Replace notify.mobile_app_your_phone with your own phone's notify action.
alias: "Daily electricity summary"
triggers:
- trigger: time
at: "21:00:00"
actions:
- action: notify.mobile_app_your_phone
data:
title: "Today's electricity"
message: >
House {{ states('sensor.house_energy_daily') | float(0) | round(1) }} kWh,
geyser {{ states('sensor.geyser_energy_daily') | float(0) | round(1) }} kWh.
Month so far {{ states('sensor.house_energy_monthly') | float(0) | round(0) }} kWh.
After a week, you will know what a normal day looks like for your house, and how much of it is the geyser. If the geyser share is high, our geyser schedule guide (https://meshnest.co.za/blog/diy-geyser-schedule-home-assistant) shows how to heat water only when you need it.
Step 7: Catch the units that disappear overnight
Between about 1 am and 4 am, most homes use only a fridge, a router and a few chargers. If the house is still drawing a lot of power then, something has been left on or is faulty. This automation subtracts the geyser, so a geyser on a night-time timer does not set it off, and alerts you when the rest of the house stays above 400 W for 30 minutes:
alias: "High standby load at night"
mode: single
triggers:
- trigger: numeric_state
entity_id: sensor.house_mains_power
value_template: >
{{ state.state | float(0) - states('sensor.house_geyser_power') | float(0) }}
above: 400
for: "00:30:00"
conditions:
- condition: time
after: "01:00:00"
before: "04:30:00"
actions:
- action: notify.mobile_app_your_phone
data:
title: "Something is using power overnight"
message: >
The house (without the geyser) has drawn over 400 W for 30 minutes.
Now {{ states('sensor.house_mains_power') }} W.
The 400 W limit is our own starting point, not an official number. Watch your mains power graph for a few nights and set it just above your normal night-time level. Keep in mind that Shelly rates the clamps at ±2% below 5 A, so very small loads are less exact.
Load shedding and inverter homes
- Outages show up clearly. When the grid goes down, the mains reading drops to zero. That makes the meter a handy record of when the power was really off. Our EskomSePush guide (https://meshnest.co.za/blog/diy-eskomsepush-load-shedding-home-assistant) adds the schedule next to it.
- Watch the restore spike. When the power comes back, the geyser, fridges and pumps all start together. The mains power graph shows that spike. If it trips your main breaker, our smart plugs guide (https://meshnest.co.za/blog/diy-load-shedding-smart-plugs-home-assistant) covers bringing loads back in steps.
- Have an inverter? Your inverter already reports its own load. A clamp on the grid feed adds what you pay for. Our SolarAssistant guide (https://meshnest.co.za/blog/diy-solarassistant-inverter-battery-home-assistant) covers getting the inverter side into Home Assistant.
Troubleshooting
- Negative power on a channel. The clamp is facing the wrong way round on the wire and needs to be turned around.
- The sensor is missing from the Energy dashboard list. The dashboard only lists energy sensors with the right device class and state class. The Energy FAQ explains how to check them under Settings > Tools > States.
- Readings stop or lag. Check the Wi-Fi signal inside the board, or use the Ethernet port. The Home Assistant docs also note that Shelly devices rely on a reachable time server (SNTP) for power measurement.
- The totals look inflated. Do not add a sensor that sums several utility meters to the Energy dashboard. The FAQ explains why this records false values.
Sources
- Home Assistant, Electricity grid: https://www.home-assistant.io/docs/energy/electricity-grid/
- Home Assistant, Individual devices: https://www.home-assistant.io/docs/energy/individual-devices/
- Home Assistant, Energy FAQ: https://www.home-assistant.io/docs/energy/faq/
- Home Assistant, Shelly integration: https://www.home-assistant.io/integrations/shelly/
- Home Assistant, Utility Meter: https://www.home-assistant.io/integrations/utility_meter/
- Home Assistant, triggers: https://www.home-assistant.io/docs/automation/trigger/
- Shelly Pro EM-50, Knowledge Base: https://kb.shelly.cloud/knowledge-base/shelly-pro-em-50
- Shelly Pro EM-50, product page: https://www.shelly.com/products/shelly-pro-em-50