What do you mean by that? The Envoy integration creates 8 sensors - 4 for production and 4 for consumption - and none of them says anything about the grid.
My “Today’s Energy Consumption” sensor is pretty close to the house consumption value displayed in the Enphase app (and probably just a bit off because the app is many minutes delayed).
Above shows grid total reporting the actual consumption, which is incorrect. Here is the other pic. I have configured nothing because I cannot see where I chan change anything wrt sensors.
OK, thanks for the clarification. Unfortunately you cannot directly add the consumption sensor to the energy dashboard under “Electricity grid”.
I wanted to find you a link to one of the plenty threads in this forum explaining what additional sensors you will need, but couldn’t find one quickly, so here is my own configuration:
First you need to calculate power exporting and power importing from your production and consumption sensors (your sensor names may be a little different):
template:
- sensor:
# Generation to grid
- name: "Current Power Exporting"
unique_id: envoy_current_power_exporting
unit_of_measurement: 'W'
state: "{{ [0, (states('sensor.envoy_current_power_production') | int(0) - states('sensor.envoy_current_power_consumption') | int(0))] | max }}"
state_class: "measurement"
device_class: "power"
availability: "{{ not is_state('sensor.envoy_current_power_production', 'unavailable') and not is_state('sensor.envoy_current_power_consumption', 'unavailable') }}"
# Grid to house
- name: "Current Power Importing"
unique_id: envoy_current_power_importing
unit_of_measurement: 'W'
state: "{{ [0, (states('sensor.envoy_current_power_consumption') | int(0) - states('sensor.envoy_current_power_production') | int(0))] | max }}"
state_class: "measurement"
device_class: "power"
availability: "{{ not is_state('sensor.envoy_current_power_production', 'unavailable') and not is_state('sensor.envoy_current_power_consumption', 'unavailable') }}"
And then you calculate the energy imported and exported:
sensor:
# Aggregating data
- platform: integration
method: left
source: sensor.current_power_importing
name: Lifetime Imported Energy
unit_prefix: k
round: 2
- platform: integration
method: left
source: sensor.current_power_exporting
name: Lifetime Exported Energy
unit_prefix: k
round: 2
These last two sensors are the one you add to your energy dashboard.
How are you all getting consumption to even work?? I used “Enphase Envoy (DEV)” repo in HACS. I only get solar production. No sensor is available via this to add for consumption. Happy to change to another repo to get this to work.
But your screenshot shows that you have a consumption sensor?! The integration should create 4 consumption sensors in total, and you can then use the current power production and consumption sensors to calculate imported and exported energy, as I have described above.
Lucky you. My system install was after it all broke for new installs. Stuck with HACS options. Okay just found a HACS integration that doesn’t err on consumption. Will see if it starts showing data and then loop back to your template!
Good afternoon, I am new to this and I have just installed the solar panels with Envoy. I have Envoy (DEV) integration.
The current consumption and production sensors do not appear in the energy panel. If you recognize them with this name:
sensor.envoy_122xxxxxxxx_current_power_consumption.
Could you tell me where I should make the changes you indicate?
Thank you very much in advance.
That is correct - those sensors are just providing the raw data from your Envoy and are not suitable as-is to be used in the energy dashbboard.
You have to copy the configuration from my post above and replace the power consumption and power production entity names with your own.
I personally use package files to organise my configuration, so that in this example the 4 new sensor definition can stay together.
Just in general, I would really recommend looking into distributing your configuration into package files. That way you can keep all configuration of a particular topic together.
Hey there. Yeah I was completely lost so that thread helped me understand where/how to drop those into config. I see what you mean though and will do that once I get it working.
At this point, I see the two new sensor entities in the Dashboard options to add. I’m assuming lifetime is daily totals adding up daily based on your example screenshot.
Weirdly, this is what I’m getting even after restarting HA:
In this case the lifetime sensors just keep increasing indefinitely, and the energy dashboard picks up the change for each day.
Ah, yes, I have seen that before when helping someone else with this integration. There is a short period of time (a couple of hours?) while the sensors build up some initial data before that all works properly on the enegery dashboard.
Copy all. Seems to be working now after not checking it overnight. No solar generated just yet but no more errors and it does show the correct 2kwh import since midnight.