Energy Management in Home Assistant

Thanks, I don’t need it right now, but it is good to know in case I need to use this component again.

I just wonder why energy statistics sometimes become crazy without visible reasons - sensor’s consumed energy (state) doesn’t changed, but energy value (sum) make a huge jump :-o

You’ll need to look at the original data,

Oh, I see. Thanks.
Probably that anomaly caused mess with energy statistic

anybody had energy panel hiccups with winter time last night? seems stats were not filled anymore until ha restart

1 Like

Possibly related - Home Assistant crashing after clocks changed?

root cause same, not quite ‘crashed’ with me… weird

Nor with me. I was still able to use HA, but CPU was high.

Same here.

My utility (Georgia Power / Southern Company) doesn’t have smart meters but someone has written an API that can extract daily power consumption (kWh) and daily cost (US$).
GitHub - apearson/southern-company-api: Node.js Library to access utility data from Southern Company power utilities (Alabama Power, Georgia Power, Gulf Power, Mississippi Power))
What is the easiest way for me to feed this into Home Assistant energy functionality? I can write a node-red node that can read this data every day and publish it to an MQTT topic, but data resets every day, so do I have to keep a running total to feed HA or is there an easier way? Thanks

While I’m waiting for my Iotawatt system to be delivered, I thought about trying to add some individual devices, like smart plugs etc. I’m not that familiar with YAML coding and can’t seem to find any resources or examples on what exactly needs to be added to the configuration.yaml file to get those devices to show up. I know that you have to define a sensor (I have both MQTT plugs and non-MQTT). There are thousands of examples on how to add the whole-house systems, but very little info on how to configure individual devices. What I have been able to find seems to have been posted before the Energy Monitor was added and doesn’t quite work with it or it is a partial example that also doesn’t work. Can anyone point me to something more definitive?

If the device was detected automatically or you have already added it then the POWER sensor should be there already. If not then this is the first step so you need to work out how to add the plug.

If you have the POWER sensor then look to see if your plug also provides an ENERGY sensor. It will have the unit of kWh or Wh. If there is no ENERGY sensor then you will have to create one using the Riemann Sum Integration. Integration - Riemann sum integral - Home Assistant

Look back through this thread and make sure your ENERGY sensor has the required attributes.

Once you have the ENERGY sensor correctly setup you will be able to add it to the energy dashboard by selecting it from the drop down list.

Is there a plan to visualize the water consumption with the energy monitor? The statistics par day with the possibility to look into the past is ingenious.

There was debate a few months ago about this.
From memory the concensus was that water is not energy, so no.

since the focus is on “Energy” Usage - I do agree.
And I think, at the moment, the energy section does still have much space for improvements… :slight_smile:

Long Term, I would love to see the Energy Dashboard evolve to a “Environmental Impact” Dashboard, which does also integrate methods for Water usage and other possible measurements… :slight_smile:

1 Like

Yes short term evolution are:

  • have addition between electricity energy and gas energy (in kWh)
  • have a new calculation of non fossil percentage taking into account gas (definitively fossil)
    There is PR ongoing that is not yet accepted
    Phil
1 Like

I was struggling with this for a long time so thanks for the pointer. I’m using an EmonPi which supplies float value for the Wattage, so this worked a treat for me…

- platform: mqtt
  name: "Garage Electric"
  state_topic: "emon/emontx/power3"
  device_class: power
  unit_of_measurement: "W"
  value_template: "{{ value | round(0,half,0) }}"
- platform: integration
  source: sensor.garage_electric
  name: Garage Electric kWh
  unit_prefix: k
  round: 2
1 Like

If you haven’t figured it out yet, this post (not mine) worked for me and saved me a load of time:

Hi everyone, I hope I don’t post in the wrong place with this question. I have a Frient/Develco electricity meter that works very well. It reads consumption from my semi-smart energy meter that the elecrical company uses to bill me. A very nice guy just helped me to show the instantaneous power being pulled (in W) and also to make a counter that shows total minutes the power has been over a certain threshold.

What I hope to achieve is to measure the consumption in kWh of my dumb heater. I know it draws 6000W when it switches on, so I want to use this for mapping the total consumption per day/week/month/year. Figure I should use a helper, counter, template sensor or whatnot… I searched the forums, documents and search engines but I can’t figure it out. I don’t have a really good knowledge of HA yet.

Something like: “Heater switches on (power being pulled suddenly increases with 5900W) → some sensor starts reading and recording this → translates the W to kWh → sends this to the UI of HA.”

Ideally it should be the actual W being read by the smart meter, but it could also be: "Power being pulled suddenly increases with 5900W → some sensor starts reading and recording this → the sensor is using the time between the increase and when it decreases with 5900W → translates the data to kWh, given that a full hour of “increased power” is 6kWh.

It would be very very good to get this into the “official” energy dashboard, but might not be possible atm…?

I think this solution could benefit a lot of people who want to brake down total household energy usage to separate devices. Some devices are permanently installed and can’t be put in one of the various existing smart plugs, and not so rarely it’s the “heavy consumers”. So if one knows the power that their device is pulling when active, one could use this solution to measure its consumption. As long as one does not have several devices that pull about the same energy when used that is.

Would appreciate some help here!

I use hassoss core-2021.10.6, HA 6.5, on a Rpi. Deconz for zigbee.!

Esentially, it’s the spikes on this I want to measure expressed in kWh used:

power|387x341

you have one major issue with your idea.
The meter, which is measuring the total usage of your household cannot be used to measure single devices.

Just imagine the following situation:

your meter is constantly measuring the energy usage of your household.
If you switch your heater on - the energy usage will be increase by x watt… but what happens, if another device will be switched on - or something will be switched off at the same time.

just going for a fix amount of increased power usage does not really help getting reliable information.