Energy Management in Home Assistant

@isaste I used the utility_meter and automations to put two tariffs. I then use these sensors in the energy for the peak and offpeak. (for my provider, APS, my plan is seasonal, so this script returns 1 of two prices if May through October).

    peak_price:
      value_template: >-
        {%- if 5 <= now().month <= 10 -%}
          0.13160
        {%- else -%}
          0.11017
        {%- endif -%}

    offpeak_price:
      value_template: >-
        {%- if 5 <= now().month <= 10 -%}
          0.07798
        {%- else -%}
          0.07798
        {%- endif -%}

When I use the single raw sensor, i used another sensor which returned the peak/nonpeak prices as well as the seasonal adjustment. Here is is just for info:

    offpeak_peak_pricing:
      value_template: >-
        {%- if (15 <= now().strftime("%H")|int <= 20) and is_state('binary_sensor.workday_sensor', 'on')  -%}
          {%- if 5 <= now().month <= 10 -%}
            0.13160
          {%- else -%}
            0.11017
          {%- endif -%} 
        {%- else -%}     
          {%- if 5 <= now().month <= 10 -%}  
            0.07798
          {%- else -%}
            0.07798
          {%- endif -%}
        {%- endif -%}

Hope this helps.

David

Very sad to see no support for Tesla in this Energy Management integration. I’ve a Tesla Powerwall with Home Energy Gateway which does have a working integration with HA. All the flow info are there live, just not total stats: grid, solar, battery, home. Please fix!

Additionally, I’d love to see some “recommendations” for power usage, such that I could pre-cool my house during peak solar (instead of sending it to the grid) using my Honeywell HVAC integration - or even just full automation here once I’ve set some parameters (ideal minimum home temp, minimum backup battery level, etc.). Sending energy to the grid loses half of the monetary value for me - so if I’m going to be cooling my house after sunset, might as well cool it with solar ahead of time - plus there is a round-trip hit of about 10% to pull the power back from my Powerwall battery system vs. just using it directly from the solar inverter.

My problem is not really about the Tariff, but mainly about which sensor of the Aeotec Meter I have to enter in the new Energy Management. If I enter the Energy Consumption (kwh), I get my data in the Energy Management Chart but it’d the total consumption (which doesn’t consider peak/offpeak) , but would like to have 2 colors cumulated bars (1 color for the Peak consumption and one for the offPeak Consumption).
I was thinking that micing Utility_meter sensor and Energy Management would work, but I’m not sur e here which Sensor from the Utility_Meter I shouold use in the Energy management

It uses any source you have configured. Worked fine with my rtl-sdr / mqtt sensor

The same here
As the energy flow seems to be “inspired” to the Tesla one, I was expecting an integration of Tesla Powerwall in Energy at day zero
Anyway thanks a lot for the big effort and waiting to see this future integration!

2 Likes

Anyone know the reason why PVOutput ( that loads the kWh data from my solar panels ) is not a valid entity for the new Energy dashboard?

1 Like

The values from Home Assistant get calculated and stored for long term storage at ± 10 minutes after the hour, these graphs reflect only the calculated values.
The homewizard uses the exact realtime data to show you the numbers.

If you want to compare both of them, you’ll need to compare data from 1 of the past days as those are completely calculated on Home Assistant. I use the DSMR-reader application, and the numbers are practically the same (give or take a few kWhs due to timestamping and when readings come in)

I connected my Tibber Pulse sensors “accumulated consumption” and “accumulated cost” to this integration yesterday, but no data is showing up in the graphs. Seemed like the right thing to do to me…

Any idea of what I’m doing wrong?

My smart meter uses zigbee, but I have been unable to get it connected to my coordinator, the sync button is behind a locked component of the meter. This is through Origin but I think my provider is actually someone else and Origin are just the reseller.

Can you have multiple tariffs based on the time of the day?

Cool, this is super useful!

I can’t seem to get it to work though, my Z-Wave measuring devices don’t show up apparently :(.

Of course. You’ll need to have a sensor entity that changes its price based on time of day.

I use “Economy 7”, which gives me 7 hours of cheaper electricity between 0:35 and 7:35, using a dumb meter that doesn’t adjust for BST. So I set the prices in the template based on fixed UTC time.

template:
  # Home Energy sensors for HAEnergy
      - name: Economy 7 Tariff
        unit_of_measurement: GBP
        state: >
          {% set e7_normal = 0.2085 %}
          {% set e7_cheap = 0.1234 %}
          {% if states('sensor.time_utc') >= ('07:35' | timestamp_custom('%H:%M', False)) %}
          {{( e7_normal ) | float}}  {% else %}
          {% if states('sensor.time_utc') >= ('00:35' | timestamp_custom('%H:%M', False)) %}
          {{( e7_cheap ) | float}}  {% else %}
          {{( e7_normal ) | float}}  {% endif %} {% endif %}
4 Likes

the existing utility meter sensor already had built in capability to change tariff; I just thought I could keep using that

+1 for an extra field for Fixed Daily Cost. My energy supplier applies this in addition to the energy tariffs (and the current DSMR Reader integration allows for this).

4 Likes

Hmm. I’m not sure about that. Using the sensors that I’ve previously posted agrees with the values that I’d been calculating prior to this release on my custom dashboard, and I’ve calibrated those with my energy company’s values.

I’m personally struggling to get this to work. I’ve been running emoncms for 5-6 years. I’ve used nodered to send the total over mqtt every 10 seconds when the usage updates.

So far so good. I have the total in Home Assistant and applied the correct customisations as far as I’m aware.

image

I’ve selected the right field in energy but it always reports zero. I’ve had it configured for 24+ hours now and although the entity value is increasing the energy screen still shows zero.

The very nice demo page shows nice graphs for monitoring individual devices, including air conditioning.

I have a number of HVAC devices. (I think other people call them mini-splits, we call them heatpumps. In any event they have a heatexchanger outside the house, and a panel on the wall that blows hot or cold air, depending on the settings and time of year).

How are people measuring the energy usage of this type of device? A current clamp to each one?

energy monitor as Sonoff pow R2 or shelly or similar

any hint how to do that?

I noticed that there is a difference between the actual amount of generated kWh and the displayed amount of kWh. How could this be explained?
image
versus
image

1 Like