Smart plugs with Home Assistant
A smart plug with energy monitoring measures what is plugged into it: one appliance, such as a fridge or a washing machine, or a whole room. Tell Tag Historian that it sits behind the house’s meter, and its own readings become a row in Where it went, taken off Everything else.
On every plan.
Last updated
Which of the plug’s sensors to send
TP-Link’s Tapo P115 is the example here; another plug or sub-meter with a power sensor works the same way. What follows about the plug is what Home Assistant’s TP-Link Smart Home page and TP-Link’s own page for the P115 said in November 2026.
- Current consumption, in W, is the one to send. Home Assistant asks the plug every 5 seconds, over the local network, without TP-Link’s cloud.
- Today’s consumption, in kWh, works as well. It starts over every day, and Tag Historian counts on through the reset. It says nothing of when in the hour something ran.
- A lifetime total is not there. Home Assistant reports total consumption only for older Kasa devices, not for Tapo.
- For Tapo devices Home Assistant needs your TP-Link account’s email address and password, and Third-Party Compatibility turned on in the Tapo app.
- The European P115 takes at most 16 A, 3,680 W. The plugs for other countries differ: read yours.
Set it up
- In Home Assistant, add the TP-Link Smart Home integration and the plug.
- In the Tag Historian integration, Configure, add the plug’s sensor to the entities it sends (the Home Assistant guide). It becomes one tag of your plan’s.
- In the Explorer, on Loads, under Own meters, choose Add a meter: the plug’s tag, the power tag it is part of, and what it measures. The tag’s own sheet under Tags takes it too. An Editor or Admin can.
You say it. The form lists first the power tags that look like a plug's, by their names and how much they have drawn, and suggests a name to change; what is part of what is never assumed. The house’s power tag has to be a power in W, kW or MW; the meter a power, or an energy meter in Wh, kWh or MWh that only counts use. A power tag takes at most 12 of them.
What is counted, and what is not measured
The meter’s energy is its own, whole hour by whole hour, priced like the house’s. It comes off Everything else, never below zero, and changes nothing of what the house measured. An hour the plug has no readings of is not measured, never 0: what it used then stays in Everything else, and the page says how many of the hours were measured.
Home Assistant sends a reading when it changes. A plug with nothing on sends none, so an hour without a reading counts when the last one was 5 W or less: for a day from that reading, and, up to a week from it, in each hour its source was heard in: the quiet-source watchdog watched the source through that hour and saw no pause in its sending (it can say so only for hours of the last 30 days), or another tag the source sends has readings in that hour. A higher value held from before may as well be a plug that lost its network, and that hour is not measured.
An hour without a reading that overlaps a stretch the quiet-source watchdog knows its source was away in is not measured (it keeps such stretches for 35 days), and nor are the hours after that week until the plug sends again: Home Assistant sends nothing for a plug it has lost either. An energy meter that comes back after hours of silence with more than 0.12 kWh at once, or has started over meanwhile, was away, not still: those hours, and the one it came back in, are not measured. What a silence was is told from the full-resolution readings, as far back as your plan keeps them and for the latest 100 silences of a period. Before that, an hour it is needed for is not measured.
The same as a load? If the house’s power tag also has a load found by its steps, choose it under Own meters: the plug’s readings then stand in its place, and the load only in hours the plug was not measured. Until you have said which, both are shown and the page says so. A plug that was measured through a quarter of an hour’s run of the load or more, and whose highest reading so far is over 30 W and under half the load’s step, is not asked about; it can still be chosen.
The figure its readings suggest
Before you set it, the field holds a figure worked out from the plug’s own readings of the last 14 days, as far back as your plan keeps every reading. One line under it says what the plug stands at, what it runs at and how much of the time it was above the figure. The figure is a round one in a clear stretch of watts the plug spends next to no time in, between standing still and running; an appliance with several levels, such as a dishwasher’s pump and its heating, gets one below the lowest, and the line names each level.
Nothing is set until you press Set, and a figure you type is the one kept. Hours in which a quiet plug sent nothing while its source was heard count as standing still at its last reading; hours its source was away are left out. With less than a day of readings, too few readings, readings too far apart while no source is known to send them, next to nothing drawn or no clear gap, the line says it is not clear yet and the field stays empty. A power tag’s Machine section on the Tags page offers the same figure before the tag is marked. It is worked out from watts alone and never says what the appliance is.
Its runs and messages
Under Own meters, Count its runs when above takes a figure of yours, for example 10 W for a washing machine: above its standby, below its lowest draw while it works. Its run hours are then on Machines, where Tell me when it stops sends a message when it has stood still for the minutes you choose. The message says what the run used in kWh, from the plug’s own readings: a dishwasher’s whole programme, as long as its beginning was seen, its source was not away and it was not silent for half an hour while it drew power.
Each run is also listed with its kWh on the machine’s page, under Runs and their kWh, for the last 30 days, as far back as your plan keeps every reading; the plug’s row under Own meters shows its median run and links to the list. A run without a figure says why. Once five runs have a figure, a line says what a run usually uses and how long it takes, the median of the latest 20; a run that used more than nine in ten of the runs before it is marked more than usual. That is a remark on the list, not an alert.
Find loads can still look in the plug’s tag. That suits an appliance with one steady draw, such as a heater or a kettle; a washing machine draws differently through its programme, so only its heating is found.
Stands still far longer than usual. For a fridge or a freezer on a plug, the plug’s row under Own meters says, when you ask, whether it can tell you when it has not run for far longer than its own longest pauses, and after how long. It learns from the plug’s last four weeks, is offered only where those weeks show it would rarely have raised, and does not count time its source was away; the rule is set beside the machine under Machines. How it is judged.
Common questions
- Does the plug need the internet?
- Home Assistant’s integration talks to the plug over the local network and not through TP-Link’s cloud. For Tapo devices it asks for your TP-Link account. The readings reach Tag Historian from Home Assistant, which needs the internet for that.
- Is a smart plug one of my plan’s tags?
- Each sensor you send is one tag. Saying that it is part of the house adds nothing.