Energy Management in Home Assistant

Hi,

Great work, energy management is one of my favorite topics, so I have to say I love this new feature of HA.

That said, I need to place one simple scenario for which I have not found any solution on all of the posts above (maybe I missied it?):

My setup is made of 2 Qubino Z-Wave smart meters giving out all types of info, including of course accumulated kWh.

The issue arises when I notice this Energy Management feature is expecting to have a smart meter at the grid side measuring what is imported and what is exported, plus one on the PV system for what is being produced, and both are read for kWh totals.

My setup has one smart meter on the production side, that one is a match for EM, but the other one is on the consumption side, i.e. it’s measuring the loads and its consumption, not the grid in/out.

I can easily determine the instant power going in or out of the grid (export/import) by calculating the difference in power between prod. and consumption, but it’s impossible to do so (AFAIK) for the energy side.

imagem

Is there any easy way to adapt the EM from the existing 2 meters (grid + production) to another option of 2 meters like I have (production + consumption)?

Most people I know that have smart meters have the same setup as I do, so I know I’m not alone in this issue, and placing a 3rd meter for the grid is something we want to avoid.

Thanks in advance.

i am a newbie here and im going crazy trying to get this to work, i use vera and i have a GE power meter for the whole house plus a few aeotec smart plugs that report energy usage. I would like all that to show in the energy page in HA , it was working fine a few months ago and since the last couple of updates it got broken…
here is my configuration.yaml
I tried to work with the changes discussed above but i guess i am doing it wrong, below was my working config. what can i change to make it work again… i really appreciate your assistance Thank you in advance!

template:

  • sensor:

    • name: “utility_power”
      state: ‘{{ state_attr(“sensor.home_energy_meter_ge_42”, “current_power_w”) }}’
      icon: mdi:transmission-tower
      unit_of_measurement: “W”
  • sensor:

    • name: “toaster_power”
      state: ‘{{ state_attr(“switch.server_23”, “current_power_w”) }}’
      icon: mdi:solar-panel
      unit_of_measurement: “W”

recorder:
db_url: 'mysql:################

Sensors - Statistics, Integration

sensor:

  • platform: statistics
    entity_id: sensor.utility_power

  • platform: statistics
    entity_id: sensor.toaster_power

  • platform: integration
    source: sensor.utility_power
    name: utility_energy
    method: trapezoidal
    unit_prefix: k
    round: 2

  • platform: integration
    source: sensor.toaster_power
    name: toaster_energy
    method: left
    unit_prefix: k
    round: 2

Utility meter entry

utility_meter:
utility_energy:
source: sensor.utility_energy
cycle: monthly
net_consumption: false

toaster_energy:
source: sensor.toaster_energy
cycle: monthly
net_consumption: false

It got broken doesn’t help us much. Most likely guess is this will help Energy Management in Home Assistant - #1225 by Gregory_Peck

If not then please explain in more detail what is wrong and post the attributes for your sensors which aren’t working.

Hi,
How did you manage to enter the active power (W) at energy dashboard?
Thanks.

Hi, any way to expose the electricity flow chart publicly ?

Still no solution.

Sorry, the image shown was just intended to prove I have access to instant power sensors, it has erroneously induced you to think that it was part of Energy Management, it is NOT, it’s just a well known custom “tesla-like” card. Apologies for the confusion caused.

I ended up doing 15 minute net-metering of both consumption and production kWh counters on both meters via automation, and using them on Energy Management as data source (template sensors), which fits nicely into the hourly graphs. Problem solved.

1 Like

thank you for getting back to me, as I mentioned, I am a total newbie, (how do you get to the attributes) again so sorry, I feel so stupid but i really want to learn and figure this out…
what is wrong now is : The sensors in the energy dashboard configurator shows the error on all sensors I add for energy meter and toaster energy “entity not defined” i have not changed any of the settings that i pasted above and i used to have a working sensor readout into the energy dashboard.
I run HA in docker and on a synology nas… I edit the config using the text editor that comes with synology (if that has anything to do with it)
thank you for being patient with me and sorry again if i am causing more confusion.

Ok go to developer tools and enter the entity that is not working. Paste all of the attributes or post a screen capture for us to see.

Coen, what do you mean by adding my: to the config. can you explain a little more please?

I have the following issue, is use customization for all the icons and names i have in front of my sensors since you can only add MDI: in the cards.

So my config is like this:

cloud:

mobile_app:

homeassistant:
  customize: !include customize.yaml

This way the “Energie” dashboard will not appear sadly
When i change it to:

cloud:

mobile_app:

default_config:

It wil appear but i lose all my custom names and icons

I hope to get both working but i don’t know how to do that

Thanks in advance, if its easier to explain in Dutch please send me a pm.

Kind regards, Sander

I found a solution, not knowing if it the correct way but it works fine so far.
I now run both commands and the system accepts it

cloud:

mobile_app:

default_config:
homeassistant:
  customize: !include customize.yaml

I now have the energie dashboard and all of my names and icons in my system.

Kind regards,

Sander

This is the correct way. Customization has nothing to do with the my: integration

See also

Hi @LArivee15. I was wondering if you could please give me some advice. I have an issue with my energy dashboard as you described and just wanted to know how you fixed it. So I have Grid power charging batteries and going to my home. So the total grid consumption shows correct but part of that consumption is to charge the batteries but now the dashboard is taking the total grid + battery usages for the Home variable but thats wrong. So the Home should be what it uses from the grid + used from the batteries but excluding the battery charge from the grid. Do you maybe have any ideas on how I can get this to calculate correctly
image

1 Like

footpath

lol, how Aussie!

My smart meter has an impulse light that blinks once every so many kWh. My impulse rate is 3200 imp/unit, which I think means 3200 flashes per kWh.

I had some dudes come round just now and install a (free, sponsored by VIC state gov) device that sits in my meter box, pairs to my phone with Bluetooth, and has an impulse light sensor that clips over the impulse LED. An app (EMS) periodically fetches all the stored data from the device. Data points older than 42 days are deleted, unless I pony up for the premium plan.

The device is called the “Emerald Electricity Advisor”. Its non-replaceable batteries last up to 7 years, and when they die, it gets thrown away.

I’m not hopeful about interfacing this with my HA via BT, so I’m going to explore other impulse counters to see what I can use. The “Glow” looks interesting.

Haha, well since our footpaths haven’t been paved for a very long time (they are either poured concrete, or bitumen), pavement would just be silly. :wink:

I manage to fix it if anyone runs into the same issue. I just created a solar sensor with zero value cause I don’t have solar and add it to the solar part and then the calculations are working correctly. Not sure why it needs the solar sensor to do the correct calculations.
image

HI @tracer-za , I’ve been on holiday for a few days without internet! Bliss!

Glad to see you solved your problem. I monitor my “home” consumption without allowing for the infrastructure energy cost of production. I don’t know if your home consumption includes the energy consumed by the inverter? On an average day my inverter consumes between 8% and 10% of the energy produced. You would have to factor this into your calculations. Today so far I have generated about 36kWh’s and my inverter has used about 3.2 kWh’s.

I’m not sure about what happened, but when I installed 2022.2.4 my Energy dashboard stopped functioning as it should.

I can see the dashboard available on the left menu, but data from sensors is no longer logged. Furthermore, I cannot find any way to change the Energy settings (sensors for panels, for grid and for consumption).

Besides having energy: on the configuration.yaml file, do I need to do something else? All sensors seem to be properly configured, but they are not updating the Energy dashboard.

Ok, I got it now: the state_class measurement was deprecated on 2022.2 and that is why my energy sensors (which are calculated sensors with state_class forced in their definiton) are not working.

Yes in case you haven’t found it here is the point in the thread where this is discussed Energy Management in Home Assistant - #1225 by Gregory_Peck

1 Like