Energy Management in Home Assistant

If not mistaken you should feed the watt value into a Rieman Sum integration sensor. That will then calculate the energy consumed in kWh

1 Like

Keith,
Do you happen to have some examples of those conversion examples? I have Sense too and would like to give this a try.

Thanks, worked perfectly

Add device_class: energy via customization to the new entity created by the integration

thank you, work

When i update my PROD env Home assistant (proxmox virtual machine ) i don’t see the energy tab at the left side. When i create a new (DEV) proxmox home assistant environment i’m seeing the energy tab immediately at the left side without adding any entities.

Why is my updated PROD env not seeing the energy tab?

HA Script i’m using for DEV and PROD(Installing Home Assistant using Proxmox)

SOLUTION: i needed to add energy: to my configuration.yaml because i didn’t have default_config: in my configuration.yaml.

1 Like

I did work for a little while here, but now I only can read the value from sensor.saj_today_yield in developer tools, but not in my energy dashboard (stays zero)
The workaround sensor can not be chosen in the energy setting

Did your values match up at the end of the day? Mine are not and I can not figure this out

I’m in the same boat as others… seems like something is off on the configuration.
comparing to other screenshots in this thread, my Solar values see to go straight into the grid when they should be subtracting from the consumption of the house. I use enphase inverters. (side issue on enphase: When using the supported enphase integretion that is auto-discovered, there is no way to pull in the inverters an entities…whereas when I used the yaml file to configure it, I could pull them in.)

The graph should show 100% of solar being used by house subtracted from the grid consumption. I’m not selling 100% of my solar to the grid at $0.49 only to buy it back at $0.118.

Got it. Thanks!

I also use this sensor. I have 2 SAJ solar invertors.
For me it seems to work well:

hello, I have 123solar sensor on my HA.
But not show on Energy management list, why?
my sensor is:


sensor:
  - platform: rest
    resource: https://192.168.1.50/metern/programs/programtotal.php  
    name: solar consumi totale giornaliero
    value_template: '{{ value_json.Dailycounter2 }}'
    device_class: energy
    unit_of_measurement: KWh    

Read the thread. The required attributes are stated more than once.

replies like this are no better than asking for something in a warehouse and having someone point, “Its over there”… not much help. At close to 600 replies, just reposting the content or saying it is in post #n would be more helpful.

…if I am not mistaken, I think some of us are coming into this with an outdated templates configuration, so simply add another block in our sensors.yaml will create an incompatible code issue…

1 Like

And reasking questions that have been answered before displays laziness and an dismissal of other peoples time as being less valuable than yours. But that may be true as I am on leave and co-incidentally in a lockdown, so here you go Energy Management in Home Assistant - #533 by nickrout

1 Like

Hi all, I searched inside this topic about Shelly with no results, anyway I made correction to the integration sensor I already have because I used to record kWh of 1 Shelly EM, now I wait maybe a day to see data in Energy dashboard, my question is: someone here has added a Shelly EM as source of the Energy dashboard and can confirm it works?

Hi @nickrout I found rhis cose:

state_class: measurement
last_reset: '1970-01-01T00:00:00+00:00'
unit_of_measurement: kWh # or Wh
device_class: energy

it is not clear to me where it should be added…can you kindly explain it to me?

update:

I succeeded, I had to add everything in the customize.yaml file.
I have several photovoltaic production sensors,
I have an immediate power sensor and a daily production sensor, in order to be able to configure the HA energy module well, do I have to use the immediate power sensor that measures the live preview or the daily reduction sensor that adds up the total energy produced?

Now no data found:
image

below my sensor:

Grid consumption sensor:
image

Return to grid sensor:
image

Solar production sensor:
image

do you think everything is ok?
maybe i have to wait two hours before seeing something or should the chart animation already work?

Your states aren’t numbers. You need to get rid of the k.

1 Like