Build a Home Assistant Power and Energy Monitoring Lab
Use one known-compatible metering device to distinguish instantaneous power (W) from accumulated energy (kWh), validate Home Assistant statistics, and prove a threshold automation safely.
Expected Outcome
Home Assistant receives a power entity and a valid energy entity from one test device, the Energy dashboard records consumption, and a controlled load/threshold test triggers and clears one notification.
Assumptions
Current Home Assistant deployment
One supported metering device/integration that exposes power and cumulative energy with appropriate device/state classes
A safe controllable load within the meter/device rating
No mains wiring unless performed with appropriately rated hardware and qualified practices
Bill of Materials
Raspberry Pi 4 or higher
MicroSD card (16GB or more)
Power supply for Raspberry Pi
Smart energy monitoring devices (e.g., TP-Link Kasa Smart Plug)
Home Assistant installation (can be done via Hass.io)
Laptop or computer for configuration
Internet connection
Build Steps
- Verify entity semantics before building dashboards
Identify which entity reports instantaneous watts and which reports accumulated energy in Wh/kWh. Confirm Home Assistant shows the expected unit, device class, state class, and increasing energy history.
- Compare against a known load
Use a safe appliance/load with an approximate known draw or a trusted reference meter. Observe baseline, turn on the load, and confirm the power reading changes plausibly rather than treating any nonzero value as calibrated.
- Add the cumulative energy entity to the Energy dashboard
Configure the supported Energy dashboard source and allow enough statistics time to populate. Do not feed a raw instantaneous watt entity directly where cumulative energy is required unless an appropriate integration/sensor conversion is deliberately configured.
- Create one threshold automation
Use a bounded threshold plus duration/hysteresis so a one-sample spike does not cause noise. Trigger a harmless notification and include current value/unit in the message.
- Run controlled high/low tests
Use the safe test load or temporarily adjust the lab threshold to enter the alert condition, confirm notification, then return below the clear threshold and confirm recovery.
Validation
Power and energy entities have correct units/classes
Known load changes power reading plausibly
Energy statistics accumulate over time
Threshold requires the configured duration/hysteresis
Notification fires and clears during controlled test
The lab distinguishes measurement confidence from billing-grade accuracy
Troubleshooting
Entity missing from Energy dashboard: inspect unit/device_class/state_class/statistics eligibility
Power works but energy does not: verify cumulative energy source rather than inventing a dashboard workaround
Implausible readings: validate device calibration/CT orientation/config before changing automations
Cleanup or Rollback
Remove temporary threshold overrides/test automation if not retained
Return test load to normal use and document device calibration limitations
Next Improvements
Explore additional integrations for other smart home devices.
Consider adding energy-saving automations based on consumption data.
Join the Home Assistant community for support and advanced configurations.
