The energy dashboard in Home Assistant is where your consumption, production, gas, water, and battery numbers come together. It is configured once, in Settings > Dashboards > Energy, by pointing it at the entities that carry those numbers.
That configuration is a list of entity IDs, kept separately from the entities themselves. Home Assistant does validate it, but only shows the result inside that configuration panel. You visit that page when you change something, not to check on it.
Spook takes Home Assistant's own check and puts what it finds in your repairs dashboard.
The individual devices on the energy dashboard are added and deleted in that same configuration, one at a time, by hand. Spook adds actions for it, so an automation or a script can do the same: put the energy sensor of a new smart plug on the dashboard the moment it is set up, and take the device you replaced off again. An AI agent with Spook's tools can do both too.
Actions
Spook adds two actions for the energy dashboard. You find them wherever you add an action, marked with a 👻. Both are for administrators only, the same as the energy configuration.
They do what Settings > Dashboards > Energy does under Individual electrical devices, and leave everything else on the energy dashboard as it is: the grid, solar, batteries, gas, water, and the other devices. A call that changes nothing writes nothing.
Add an individual device
Puts one or more devices on the energy dashboard, the same as Add device in the energy configuration.
You plugged in a new smart plug for the dishwasher. Home Assistant has its energy sensor the moment it is set up, but the energy dashboard does not know about it until you add it there by hand. With this action, an automation does that for you.
Every device is checked first, the way the energy dashboard checks it: an energy sensor in a unit of energy, one that totals up, and one the recorder keeps. A sensor that measures power is refused. So is a sensor that is on the energy dashboard already, as something other than an individual device, and an energy sensor made with an Integral helper from a power sensor whose energy is counted there already. Two sensors that count the same energy in another way, like the total and today's consumption of one smart plug, look like two devices: pick one of them. If one of them does not fit, none of them go on.
A device that is on the energy dashboard already stays where it is, and gets what you give for it, like a new name. Asked again, nothing changes, so it is safe to run as often as you like.
How to use it
- Open the automation or script that should add the device, and select Add action.
- Search for add an individual device, and select Energy: Add an individual device 👻.
- Under Device energy consumption, choose the energy sensor of the device.
- Fill in a Display name, a Device power consumption sensor and an Upstream device if you like.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it changes the energy dashboard for real.
| Action properties | |
|---|---|
| Action | Energy: Add an individual device 👻 |
| Action name | energy.add_device |
| Action targets | No targets |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
stat_consumption | string | list of strings | Yes | sensor.dishwasher_plug_energy |
name | string | No | Dishwasher |
stat_rate | string | No | sensor.dishwasher_plug_power |
included_in_stat | string | No | sensor.main_board_energy |
stat_consumption takes the energy sensors of the devices. Statistics an integration keeps without a sensor, like supplier:energy_consumption, work too, the same as in the energy configuration. Their statistics are all there is to check: they need a unit of energy and a running total, and when the recorder does not answer in time, the call is refused. Try again in a moment.
name and stat_rate are for one device at a time. stat_rate is the power sensor the energy dashboard shows next to the device. Left out when a device is added, an energy sensor made from a power sensor with an Integral helper brings that power sensor along. A power sensor another device shows already is refused.
included_in_stat is the upstream device: the individual device these are part of, which counts their energy already. It has to be on the energy dashboard as an individual device, and cannot be part of the device itself.
Leave a field out and it stays what it is. Empty, or null in YAML, takes it away again.
Put every new TP-Link smart plug on the energy dashboard, once its energy sensor has its first value. A plug has three energy sensors: its total consumption, today's, and this month's. All three count the same energy, so only the total goes on. Home Assistant names the entity ID in the language it is set up in: in English, the total ends in _total_consumption. Check the name of yours on the page of the plug.
mode: queued
max: 10
triggers:
- trigger: event
event_type: entity_registry_updated
event_data:
action: create
conditions:
- condition: template
value_template: >-
{{ trigger.event.data.entity_id.startswith('sensor.')
and trigger.event.data.entity_id.endswith('_total_consumption')
and trigger.event.data.entity_id in integration_entities('tplink') }}
actions:
- wait_template: "{{ states(trigger.event.data.entity_id) | is_number }}"
timeout: "00:05:00"
continue_on_timeout: false
- action: energy.add_device
data:
stat_consumption: "{{ trigger.event.data.entity_id }}"
Queued, so a second plug set up at the same time waits its turn, rather than being dropped while the first one waits for its value.
The heat pump has a meter of its own, and so does the main board of the house, which is on the energy dashboard as an individual device. Add the heat pump as part of it, so its energy is not counted twice:
action: energy.add_device
data:
stat_consumption: sensor.heat_pump_energy
name: "Heat pump"
stat_rate: sensor.heat_pump_power
included_in_stat: sensor.main_board_energy
- This is for the individual electrical devices only. Water and gas devices, the grid, solar and batteries stay in the energy configuration.
- A new device whose energy sensor is unavailable right now is refused: what it measures cannot be checked. Try again once it is back. A device on the energy dashboard already can still be changed while its sensor is unavailable.
stat_ratetakes a sensor with device class power, in a unit of power. The energy configuration also takes statistics in a unit of power that have no sensor; pick those there.- The energy dashboard draws a device from its statistics. Those Home Assistant kept of the sensor before you added it show up too; only a time without statistics stays empty.
- This takes an admin when a user calls it. Automations and scripts are not affected.
Remove an individual device
Takes one or more devices off the energy dashboard, the same as deleting one in the energy configuration.
The other half of Add an individual device: the old fridge went out, the new one has a new plug, and the old one only adds a flat line to the energy dashboard. The statistics of the device stay, with all their history, so adding it again brings it all back.
Devices that were part of a device you remove stay on the energy dashboard, and stop saying so, the same as in the energy configuration. A device that is not on the energy dashboard is no change, and no error.
How to use it
- Open the automation or script that should remove the device, and select Add action.
- Search for remove an individual device, and select Energy: Remove an individual device 👻.
- Under Device energy consumption, choose the energy sensor of the device.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it changes the energy dashboard for real.
| Action properties | |
|---|---|
| Action | Energy: Remove an individual device 👻 |
| Action name | energy.remove_device |
| Action targets | No targets |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
stat_consumption | string | list of strings | Yes | sensor.old_fridge_energy |
The energy sensors of the devices, or the statistic IDs they are on the energy dashboard by.
The new fridge replaces the old one, in one script:
sequence:
- action: energy.remove_device
data:
stat_consumption: sensor.old_fridge_energy
- action: energy.add_device
data:
stat_consumption: sensor.fridge_energy
name: "Fridge"
- This is for the individual electrical devices only. Water and gas devices, the grid, solar and batteries stay in the energy configuration.
- The statistics stay. To delete them too, use Settings > Tools > Statistics.
- This takes an admin when a user calls it. Automations and scripts are not affected.
Repairs
Spook checks your energy configuration for entities and solar forecasts that no longer exist, and tells you in the repairs dashboard. New to repairs? Follow Fix your first repair.
Unknown referenced entities
The energy dashboard uses an entity that no longer exists, usually because it was removed or replaced, or did not load. The dashboard does not complain: it leaves that source out, so a missing gas sensor looks like a month where you used no gas.
Unknown referenced entities
The energy dashboard uses an entity that no longer exists, usually because it was removed or replaced, or did not load. The dashboard does not complain: it leaves that source out, so a missing gas sensor looks like a month where you used no gas.

How to fix it: Select the repair. It gives you three choices:
- Take the deleted ones out of the energy configuration, which removes those the repair marks as deleted, ones Home Assistant removed, the way each setting allows. A missing meter takes its source or device along: a solar panel, a battery, a gas or water meter, or one way of a grid connection or of a battery measured per direction. A missing price or cost is only cleared, so the meter it belonged to keeps counting. A device that was part of a device that goes stops saying so.
- Let me do it myself, which points you at Settings > Dashboards > Energy.
- Keep them, stop telling me, which leaves them alone and stops the repair coming back.
Was the entity renamed and not removed, like a device that was paired again? Then pick the new one in the energy configuration yourself. Taking it out means the dashboard stops showing the history of that source; the statistics themselves stay. The repair disappears by itself once it is fixed.
Spook runs Home Assistant's own energy validation and looks for one result out of the several it can return: an entity with no state at all. That is usually one that was removed. The same result also covers an entity that never loaded or failed to set up, so treat it as something to check, not as a verdict. That is also why Spook only takes out the ones Home Assistant deleted. A button that removes something needs proof the entity was removed, and Spook only takes Home Assistant's own word for that: the entity registry keeps a record of every entity it deleted, for a month after nothing owns it any more. Something that is merely not there yet looks exactly like something that is gone: a YAML sensor without a unique ID whose integration is still starting, or an entity of an integration that is retrying its setup. Neither has a state, neither is in the registry, and Spook cannot tell them apart. So those are reported, and left for you to check. The other results are either temporary (an entity that happens to be unavailable right now) or a configuration choice, so Spook leaves those alone.
The dashboard draws the sources it can still read and leaves out the one it cannot. The graph still looks plausible, and is wrong.
Spook looks again before it takes anything out, and only touches what the list you read and that fresh look agree on. An entity that is back by the time you choose is left where it is. If none of them is still unknown, Spook says so.
Unknown solar forecasts
Your solar panels take their forecast from an integration like Forecast.Solar. Remove that integration, and Home Assistant keeps its ID in the energy configuration anyway. The energy dashboard then shows no forecast, and does not say why. The energy configuration does not help either: it only lists the forecasts that still exist, so there is nothing to untick.
Unknown solar forecasts
Your solar panels take their forecast from an integration like Forecast.Solar. Remove that integration, and Home Assistant keeps its ID in the energy configuration anyway. The energy dashboard then shows no forecast, and does not say why. The energy configuration does not help either: it only lists the forecasts that still exist, so there is nothing to untick.
How to fix it: Select the repair. It gives you three choices:
- Take them out of the energy configuration, which removes the forecasts that are gone from every solar source that uses them. Your solar panels stay, and so does their history. A forecast that still exists is left where it is.
- Let me do it myself, which points you at Settings > Dashboards > Energy. Handy when you added the integration again: it got a new ID, and you pick it under your solar panels. The old one stays behind, though, so this repair stays up until Spook takes it out.
- Keep them, stop telling me, which leaves them alone and stops the repair coming back.
The repair disappears by itself once it is fixed.
Spook reads the forecasts of every solar source in the energy configuration, and asks Home Assistant for the integration entry of each. Home Assistant knows every entry before any integration starts, whether it loaded, failed, is disabled or ignored, and never hands out the same ID twice. So a forecast without an entry is one that was removed, and it is not coming back. Spook looks the moment an integration is removed, and again whenever the energy configuration is saved.
Spook looks again before it takes anything out, and only touches what the list you read and that fresh look agree on.
Use cases
What people use this for:
- Replacing an energy meter. The new integration gives you new entity IDs, the energy dashboard keeps the old ones, and the totals stop adding up.
- Renaming a sensor that feeds the dashboard. Renaming is quick, and it is easy to forget that the energy configuration still points at the old name.
- Putting every new smart plug on the energy dashboard the moment it is set up.
- Swapping a replaced appliance on the energy dashboard in one script: the old one off, the new one on.
Missing something here?
An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.
Cover
Spook adds actions that move a cover in Home Assistant a step further open or closed, or turn its slats a step, without working out the new position yourself.
Home Assistant
Spook tells you what piled up in Home Assistant itself, like customizations for entities that are gone, helpers whose sources are gone, and areas, floors, labels and blueprints nothing uses.

