Energy Management in Home Assistant

Yes, see my post here to make template sensor from emoncms feeds that will appear in the Energy selector. Make sure you configure the feeds to be all-time values (kWh and never resets)

1 Like

Where can I find the board designs and schematics for the two open-source hardware projects?
I can’t find it for “Slimme lezer”

I found the code here:
zuidwijk/dsmr (github.com)

I don’t have the energy dashboard. How can I get it ?
I also can’t add cards like the energy-distribution or enegry-date-selection to my yaml.
Same for the energy settings. Where can I find them ?

If I use the demo site it looks the energy card is not a known card. It is possible to add there as manual card but the same config doesn’t work in my setup.

I added the “default_config:” to the configuration file like I found as a suggestion somewhere here above and now I do have the Energie tab on the left.
I don’t get why this is now as a tab and not something in settings.

I build my own grid and PV measuring system but I can’t add those as grid, pv or consumer
Example sensors are :

  • sensor.amp2_current4 in A
  • sensor.amp2_watt4 in W

For the glow, you hardly need schematic to follow this

Nice work. How do you get the ‘sensor.emoncms2_solar_all_time’? I cannot find it under emoncms.

Would it be possible to help integrate with efergy?

image

Only show shelly sensor …i have efergy and pvout integration

PVOutput

The pvoutput sensor platform consumes information from PVOutput which were uploaded by your solar photovoltaic (PV) system.

To add PVOutput details to your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: pvoutput
    system_id: YOUR_SYSTEM_ID
    api_key: YOUR_API_KEY

YAML

Copy

CONFIGURATION VARIABLES

Looking for your configuration file?

api_key string REQUIRED

Your API key. A read-only key is fine.

system_id string REQUIRED

The ID of your station.

name string (optional, default: PVOutput)

Name of the sensor.

To format the PVoutput sensor it’s recommended to use the template component. For example:

sensor:
  - platform: pvoutput
    system_id: YOUR_SYSTEM_ID
    api_key: YOUR_API_KEY
  - platform: template
    sensors:
      power_consumption:
        value_template: "{% if is_state_attr('sensor.pvoutput', 'power_consumption', 'NaN') %}0{% else %}{{ state_attr('sensor.pvoutput', 'power_consumption') }}{% endif %}"
        friendly_name: "Using"
        unit_of_measurement: "Watt"
      energy_consumption:
        value_template: '{{ "%0.1f"|format(state_attr("sensor.pvoutput", "energy_consumption")|float/1000) }}'
        friendly_name: "Used"
        unit_of_measurement: "kWh"

Dont work

The energy functionality needs a kWh sensor. If you have a W sensor, you can create a kWh sensor from it with the integral integration.

How many more times do you think this will need to be posted LOL.

Just to note it also works with a Wh sensor.

For those in the southern hemisphere, if your not seeing any data in the Solar Production graph try disabling the solar forecast option in the Energy configuration for Solar production.
As if your region is not supported by Solar Forecast you will never get any data displayed. If you disable it you’ll at least get your production displayed.

3 Likes

Thank you, I’ve been trying to work out why that was not working!

First, bravo for rolling this out. Looking forward to seeing how it evolves.

I would say I am disappointed that the Smart Meter Texas integration isn’t showing up in the Integrations web site as an Energy integration but given it hasn’t worked in ages, I’m not surprised.

Thankfully, some time back I found a NodeRed implementation for integrating with smartmetertexas.com and was able to get it working. Even better, as it has the basic entities needed by Energy, one for hourly energy in kWh and an input number entity for cost per kWh, as soon as I went through the initial setup the dashboard appeared with a view of my energy for most current hour and by hour for today. Hopefully, someday the native SMT integration will work and I won’t need NodeRed for this but in the meantime it’s great to be able to start using the Energy feature.

However, with thanks to all our friends in Europe who helped drive the development of this, we need a way to set the units of measurement for the cost; mine is dollars but it displays with a Euro symbol and I haven’t found a way to change it.

My other request/question is how to get views other than per day by hour. With my current setup using the NodeRed SMT integration, I have sensors for periods like yesterday, this week/month/year, last week/month/year, etc. Based on what I have read so far, it seems like the way to get this without all my existing template sensors and with the data stored using the new sensor history capabilities would be to add a utility_meter integration with entries for each period to track?

On a roll, so here’s a feature request: ability to provide comparative views of energy usage such as mean, min, max over time for a given day of week, hour of day, month and so forth (e.g., what is my peak usage hour per day within a season, how did this week compare to same week last year, etc.).

Change the currency setting in Config|General.

2 Likes

I’ll second this request. I’d love to be able to pull this data in from my Tesla PowerWall integration.

Of course, if also like to not have to log into that integration daily too, but that’s another story.

1 Like

Would be great to know if templated sensors is coming to the energy integration. I have two Fronius inverters; one old generation Primo (4kw) and one newer generation Gen24 Primo (6kw) plus a battery and smart meter. The current Fronius integration doesn’t seem to have been updated for the Gen24 models. Even if they did, the old and the new models can’t be cabled together so they can communicate energy information. So the only way to get the correct total of PV production, total consumption and battery info stats is via template sensors. I use a combo of MODBUS and REST integrations to the inverters to get the info I need and combine them using templates. (BTW, thanks for adding the Energy functions to HASS. Great to have this included as native capability).

You can add multiple sensors to the Grid consumption and Return to Grid sections.

I’ve got SolarEdge working correctly by creating to Utility Meter sensors that just rely on the existing SolarEdge Import/Export sensors. You may be able to create a Utility Meter sensor pointing at your template sensors?

My utility meter is only updated ever couple of weeks, as I have to manually read it and enter the running total.

The utility meter shows the correct consumed energy and can be added to the dashboard.

However the energy dashboard does not show any values for grid. I was hoping that statistics would be created with averages for the time intervalls between readings.

Was I hoping too much or am I doing something wrong.