For local-only home energy monitoring, send meter readings to Home Assistant over your home network. Use ESPHome’s native API for a compatible ESPHome meter, MQTT if you want a local broker, or a built-in local API such as Shelly’s. Cloud polling needs internet access to fetch fresh readings. Home Assistant offline operation · Home Assistant ESPHome integration · Home Assistant MQTT integration · Home Assistant Shelly integration
Compare the four data paths
| Path | How readings reach Home Assistant | What must be reachable |
|---|---|---|
| Cloud polling | Home Assistant asks a cloud service for readings at intervals. Sense is one example. | The cloud service over the internet. IoT classes · Sense |
| ESPHome native API | An ESPHome meter pushes sensor changes over a direct connection to Home Assistant. | The meter on your local network. ESPHome integration |
| Local MQTT | The meter publishes readings to a broker, and Home Assistant subscribes. An ESPHome meter can use this path too. | The local broker from both the meter and Home Assistant. ESPHome MQTT · Home Assistant MQTT |
| Built-in local API | Home Assistant connects directly to the Shelly device. The Shelly integration uses RPC for Gen2 and later devices. | The meter on your local network. Shelly integration |
The Sense integration documents updates every 60 seconds for its active power sensors and every 5 minutes for its energy trend sensors. Home Assistant Sense integration
Check setup and authentication as well as the routine data path. For example, Home Assistant polls the Enphase Envoy over its local REST API. On Envoy firmware 7 and newer, the access token comes from Enphase’s cloud. Home Assistant Enphase Envoy integration
Connect an ESPHome meter directly
Start with an installed meter already configured to expose its sensors in ESPHome. The ATM90E32 documentation covers hardware such as the CircuitSetup 6-Channel Energy Meter. ESPHome ATM90E32 Power Sensor
-
In ESPHome Device Builder, select Edit on the meter and configure
apiwith encryption. Replace the placeholder with a key generated on the ESPHome documentation page. ESPHome Native API Component · Getting Started with ESPHomeapi: encryption: key: "YOUR_ENCRYPTION_KEY_HERE" -
Select Save, then Install to apply the change. Getting Started with ESPHome
-
In Home Assistant, go to Settings > Devices & services. Set up the discovered device, or select Add Integration > ESPHome and enter the meter’s IP address or hostname. Use port
6053if the meter uses the default. Enter the same encryption key when prompted. Home Assistant ESPHome integration
Send readings through a local MQTT broker
-
Run a broker on your home network. Home Assistant recommends the official Mosquitto broker app where apps are available. Add the MQTT integration and let it set up the app, or supply your existing broker’s address and port, plus credentials if required. For a meter connecting to that broker, you can create an additional login in the app configuration. Home Assistant MQTT integration
-
For an ESPHome meter, add the MQTT settings below to its configuration. Use the local broker’s address and the meter’s login if required. MQTT discovery is enabled by default on both sides. ESPHome MQTT Client Component · Home Assistant MQTT integration
mqtt: broker: 10.0.0.2 username: energy_meter password: !secret mqtt_passwordReplace the example IP address and username. Set
mqtt_passwordto the meter’s broker password in ESPHome’ssecrets.yaml. If the meter will use MQTT only, remove theapi:block or setreboot_timeout: 0sunder it. Otherwise the meter can reboot when no native API client connects. Select Save, then Install in Device Builder. ESPHome YAML configuration · ESPHome MQTT Client Component · Getting Started with ESPHome -
To check a Mosquitto setup, go to Settings > Devices & services, select the Mosquitto broker integration, then Configure. Enter
#in Listen to a topic and select Start listening. Look for messages from your meter. Home Assistant MQTT integration
Use a meter’s built-in local API
If Home Assistant didn’t discover your installed Shelly Pro 3EM, open Settings > Devices & services > Add Integration and select Shelly. Enter the meter’s local hostname or IP address. Shelly requires a qualified electrician to install this model. Home Assistant Shelly integration · Shelly installation prerequisites
To disable the vendor cloud connection, open the meter’s local web interface and disable Cloud under Settings > Connectivity. The cloud indicator is gray when the cloud connection is disabled. Shelly Pro 3EM Web Interface Guide
For a Pro 3EM using the triphase profile, make the HTTP GET request below from your home network. Replace the example IP address with your meter’s local address. If you enabled authentication, use an HTTP client that supports digest authentication. Shelly Pro 3EM device profile · Shelly EMData API reference · Shelly RPC channels
http://192.168.33.1/rpc/EMData.GetStatus?id=0
The response includes total_act for total active energy across the phases and total_act_ret for total active returned energy. Both use watt-hours (Wh). Shelly EMData API reference
Check that readings are still arriving
- In Home Assistant, open Settings > Tools > States and find the meter’s power entity. During an internet outage with the home network still up, look for a change in the reading. Home Assistant Tools · Home Assistant offline operation
- For MQTT, watch for a new message from the meter during that check. A retained sensor value can be replayed when Home Assistant restarts or reloads. Home Assistant MQTT integration · Home Assistant MQTT Sensor
- For Shelly, check in the meter’s web interface that its configured SNTP time server is reachable. Home Assistant’s Shelly documentation flags time synchronisation as a dependency for features such as power measurement. Home Assistant Shelly integration
Add whole-home consumption to the Energy dashboard
Watts (W) show how fast you are using energy. Kilowatt-hours (kWh) show how much energy has been used. Use a sensor that measures the whole home’s consumption for this dashboard field. Home Assistant energy FAQ · Home Assistant home consumption dashboard
| Reading | Home Assistant attributes | Use |
|---|---|---|
| Whole-home energy | device_class of energy and state_class of total or total_increasing | The main home consumption sensor. Home meter requirements |
| Live whole-home power | device_class of power and state_class of measurement, with a supported unit such as W or kW | Optional sensor for live views such as Now. Live power requirements |
Go to Settings > Dashboards > Energy. Under Home consumption, select Add home meter. Choose the energy entity and, optionally, the live power entity. Select Save. Home Assistant home consumption dashboard
If your meter only provides power, select its power sensor for home consumption and select Save. Choose Create when Home Assistant offers to calculate energy, or Use sensor if the dialog only lists existing sensors. New helpers start counting when created. Home Assistant energy FAQ
If a sensor is missing from the list, check its device class, state class and unit under Settings > Tools > States. Then check Settings > Tools > Statistics for errors on that entity. Home Assistant energy FAQ
Evidence and limits. Documentation was checked on November 26, 2026. The instructions follow Home Assistant 2026.11.3, ESPHome 2026.11.1, Shelly’s Gen2 API reference version 1.0 and the Shelly Pro 3EM web interface guide. The steps were not run on hardware.