Enphase Envoy with Energy Dashboard

Oh right so just the names are different

Grid Import Power to your sensor.power_import
Grid Export Power to sensor.power_export

So I just need to substitute with my sensor names, got it

The energy Dash you are referring to is the HA one right? Already have the Dash configured
image

thanks for the help

Once the new heat pump is in I will have it setup with automatons. Cant wait…

1 Like

Hey guys! I found an issue with my data reporting here
image
When the day ticks over, the production doesn’t start at zero, instead it starts at 3.54kWh. Is there anything I can do to fix this? Here’s my energy dashboard


Any help would be appreciated to balance this out. Dunno why it’s doing this, it happened after my Envoy firmware got updated to the latest version.

Just checked mine, and the “Energy production today” value is reset to 0 at midnight.

not resetting to 0 can be worked around by setting up an integration sensor to record power over time into an energy figure.

hmmm, how would i do that? could you give any pointers? Thank you!

Sure, I just wrote about how this works in another topic.

As for how you would do it, you would find the name of your solar power production sensor and use that in the “Input Sensor:” field.
My only warning would be to make sure your power sensor is in W (Watts) as Riemann sum integral seems to only work when I use a sensor expressed in W (Watts) in my experience.

I was wondering if someone could help me. I believe I have everything right, but my import energy doesn’t seem to be working.

Here is code from my configuration.yaml


template:
  - sensor:
        name: Grid Import Power
        state_class: measurement
        icon: mdi:transmission-tower
        unit_of_measurement: W
        device_class: power
        state: >
            {{ [0, states('sensor.envoy_121804003802_current_power_consumption') | int(0) - states('sensor.envoy_121804003802_current_power_production') | int(0) ] | max }}
  - sensor:
        name: Grid Export Power
        state_class: measurement
        icon: mdi:transmission-tower
        unit_of_measurement: W
        device_class: power
        state: >
            {{ [0, states('sensor.envoy_121804003802_current_power_production') | int(0) - states('sensor.envoy_121804003802_current_power_consumption') | int(0) ] | max }}


sensor:
  - platform: integration
    name: Grid Import Energy
    source: sensor.grid_import_power
    unit_prefix: k
    unit_time: h
    method: left
    
  - platform: integration
    name: Grid Export Energy
    source: sensor.grid_export_power
    unit_prefix: k
    unit_time: h
    method: left

This is the entities added to the energy dashboard

Perhaps it’s just taking time? as I haven’t imported any energy yet

Don’t worry, human error, all working :slight_smile:

so… I was playing with the way it shows me all this info. I wanted to incorporate the energy distribution for the day on the top right. At the moment its just a duplicated live usage powerflow card entity. Any thoughts?

Like this?

Here is my code

cards:
  - type: custom:power-flow-card-plus
    entities:
      grid:
        entity: sensor.power_net
      solar:
        entity: sensor.power_production
      home:
        entity: sensor.power_consumption
      fossil_fuel_percentage:
        entity: sensor.grid_fossil_fuel_percentage
  - type: energy-distribution

Thanks much appreciated.

Hmm I added that to a card and I was getting errors.

I didnt have the sensor.power_consumption instead used sensor.envoy_XXXXXXXXXX_current_power_consumption

Also I had to move this to the left and remove the "- "

- type: energy-distribution

Need to wait until it loads info, but will post it after it does.

Hi,

Either create a new view or edit an existing view and press the pencil icon.

Then press the 3 dots in top right and press edit in yaml

Then paste in the code

The - type: is used for each card in the page

The other method is to press add card, choose manual, paste in type: energy-distribution

Cool

Got it working. Top right

Any reason the Grid Export and solar info does not match? Seems off significantly

Energy Dashboard updates once every hour.
Enphase enlighten cloud updates every 15 mins.
Your sensors in home assistant update every minute if using the native enphase integration.
I use the sensors to create power and energy graphs like this

Oh interesting. Is this Apex charts?

No, just history graph built into home assistant. I put them all into the same history graph and home assistant draws a different graph for each metric type (W, kW, kWh, $)

Oh right. I have only one rate, no peak or off peak. I just added this.
Any way to define what the start time?
Also would have loved to see ability to do on the fly change of view to see breakdown last 2 to 8 hours progressively.

I did something like this.

While in dasboard, go to pencil icon,

image

then … / raw configuration editor

image

title: ''
views:
  - theme: Backend-selected
    title: 3H
    path: 3H
    type: panel
    icon: ''
    badges: []
    cards:
      - type: history-graph
        entities:
          - entity: sensor.power_consumption
          - entity: sensor.power_production
          - entity: sensor.power_import
          - entity: sensor.power_export
        refresh_interval: 60
        hours_to_show: 3
  - theme: Backend-selected
    title: 6H
    path: 6H
    type: panel
    icon: ''
    badges: []
    cards:
      - type: history-graph
        entities:
          - entity: sensor.power_consumption
          - entity: sensor.power_production
          - entity: sensor.power_import
          - entity: sensor.power_export
        refresh_interval: 60
        hours_to_show: 6

That gives me tabs for different durations

image

1 Like

Thanks. I am currently having issues with Apex chart and memory leak in firefox. Dam thing crashes, so using Edge which is also blowing up in memory usage.

I finally got this working and here is my automation for the water tank. Works like a charm.
Parameters that I can change are:
time to switch over to element and back
temperature limit for heat pump and element operation.

All four targets I am thinking of using helpers to setup if I want a front dash interface instead of accessing the automation settings. Depends on how frequently I am doing it I guess.

Update: I changed it to accommodate if export is below 1w.

Thanks for your help again.

alias: Water Heater
description: ""
trigger:
  - platform: numeric_state
    above: 1400
    for:
      hours: 0
      minutes: 2
      seconds: 0
    entity_id:
      - sensor.grid_export_power
    id: Overproduced Energy
  - platform: numeric_state
    for:
      hours: 0
      minutes: 0
      seconds: 10
    entity_id:
      - sensor.grid_export_power
    id: Underproduced Energy
    below: 1
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Overproduced Energy
          - condition: state
            state: "off"
            entity_id: binary_sensor.dynamic_x8_heat_pump_element
          - condition: sun
            before: sunset
            after: sunrise
        sequence:
          - service: water_heater.set_operation_mode
            metadata: {}
            data:
              operation_mode: electric
            target:
              entity_id: water_heater.dynamic_x8_heat_pump
          - service: water_heater.set_temperature
            metadata: {}
            data:
              temperature: 70
            target:
              entity_id: water_heater.dynamic_x8_heat_pump
            enabled: true
          - service: notify.notify
            data_template:
              message: Water Heater Element On
      - conditions:
          - condition: trigger
            id:
              - Underproduced Energy
          - condition: state
            state: "on"
            entity_id: binary_sensor.dynamic_x8_heat_pump_element
            enabled: true
          - condition: sun
            before: sunset
            after: sunrise
            enabled: true
        sequence:
          - service: water_heater.set_operation_mode
            metadata: {}
            data:
              operation_mode: heat_pump
            target:
              entity_id: water_heater.dynamic_x8_heat_pump
          - service: water_heater.set_temperature
            metadata: {}
            data:
              temperature: 60
              operation_mode: heat_pump
            target:
              entity_id: water_heater.dynamic_x8_heat_pump
            enabled: true
          - service: notify.notify
            data_template:
              message: Water Heater Element Off
mode: single

1 Like