Replies: 18 comments 6 replies
-
There is only one solar production sensor on the inverters: If you have a production meter that would provide another option. |
Beta Was this translation helpful? Give feedback.
-
These are on my system: ![]() ![]() |
Beta Was this translation helpful? Give feedback.
-
On a system with a SolarEdge DC based battery, thats not quite true. As the battery is DC connected, it goes through the inverter and its output appears here too as a combined generated value.
For example my system my I1 AC energy kWh shows the below:
[Image.png.png]
…________________________________
From: Seth ***@***.***>
Sent: Wednesday, July 19, 2023 6:20:16 PM
To: WillCodeForCats/solaredge-modbus-multi ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [WillCodeForCats/solaredge-modbus-multi] Wiki Documentation detailing Energy Dashboard setup (Issue #369)
These are on my system:
[Screenshot 2023-07-19 at 10 19 20 AM]<https://user-images.githubusercontent.com/48533968/254654155-1a91cee4-7a9d-4beb-af4b-9aac64275bea.png> [Screenshot 2023-07-19 at 10 19 36 AM] <https://user-images.githubusercontent.com/48533968/254654271-3f6b4cf2-af82-4ab8-b850-1bcc7394169a.png>
—
Reply to this email directly, view it on GitHub<#369 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQ3KT4N5FGANSMREMS3WM7LXRAJNBANCNFSM6AAAAAA2P4OTNE>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yeah I don't have any experience with how that entity interacts with battery. |
Beta Was this translation helpful? Give feedback.
-
No worries at all.
This is my configuration for a single inverter, single battery configuration if it helps anyone.
https://gist.github.com/Ashpork/f80fb0d3cb22356a12ed24734065061c
…________________________________
From: Seth ***@***.***>
Sent: Wednesday, July 19, 2023 7:42:00 PM
To: WillCodeForCats/solaredge-modbus-multi ***@***.***>
Cc: Ashpork ***@***.***>; Comment ***@***.***>
Subject: Re: [WillCodeForCats/solaredge-modbus-multi] Wiki Documentation detailing Energy Dashboard setup (Issue #369)
Yeah I don't have any experience with how that entity interacts with battery.
—
Reply to this email directly, view it on GitHub<#369 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQ3KT4PCKFHMHXXRTSHQN2LXRAS7RANCNFSM6AAAAAA2P4OTNE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Perfect! I have one battery per inverter, so I should be able to adapt. |
Beta Was this translation helpful? Give feedback.
-
Added to wiki/YAML-Sample-Configurations |
Beta Was this translation helpful? Give feedback.
-
As this is in the Wiki, might want to re-indent Line 50. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It needs at least 2 data points to generate statistics and can take up to 2 hours. Also, if you see the gists, you'll note that you can't just add the Inverters AC Energy to get the Solar Panel production. That is because it also includes any energy coming from the battery. Instead, we create a new sensor which uses the inverter's DC power and removes the battery's contribution to calculate the remainder, which, presumably, is what is being generated by solar. |
Beta Was this translation helpful? Give feedback.
-
I have made an updated version of the above gist for 2 inverters/2 batteries, also fixed several issues and made it easier to deploy as a package: https://gist.github.com/thargy/f9713cd6c06bc77a22a4b323ed0f83af In current testing, it is working very well. Once I have a few days of comparables, I may consider making the package configurable so that you can specify combinations of inverters/panels/batteries and have it create the summary statistics for you. That is doable in YAML, though you wouldn't have the intermediate sensors. In the meantime, if you are pretty familiar with YAML, it provides enough insight to be converted for any installation. |
Beta Was this translation helpful? Give feedback.
-
Thanks, this is what I was looking for. |
Beta Was this translation helpful? Give feedback.
-
The energy dashboard is particularly sensitive about having the correct Yeah, I dumped my Pi and changed is to be a second Zigbee2MQTT coordinator for my sensor network (which is so spammy it made the primary network unstable). I replaced it with a relatively cheap Imported N305 NUC which has been rock solid ever since (and seriously overpowered). However, you can do a lot of clean-up via judicious use of the "System-> Devices & Services -> Entities" and "Developer Tools-> Statistics" pages without throwing away all the juicy data, if you're motivated sufficiently! |
Beta Was this translation helpful? Give feedback.
-
Thanks, I know, but somehow I have a situation where some entities are duplicate, some are not working properly, I think something got messed up in my database and I like to start over with a fresh installation. Just hope that all my backups are working properly. |
Beta Was this translation helpful? Give feedback.
-
Hi again...I just did a fresh reinstall of Home Assistant and set up Solaredge Modbus Multi. As I have a single inverter/single battery system, I tried @Ashpork 's config file. I tried putting it in my packages dir as well as in the config.yaml, both give no errors and the sensors will show up but not the utility meters. Any idea why? Edit: Nevermind, thought they'd appear as meters. I just edited @thargy's config to be used with my setup, went flawlessly, should be working now. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'd like to jump in here. The Power-Flow-Card-Plus is working perfectly, thanks to @thargy for his great example. Also, on the Home Assistant Energy dashboard the Grid Import/Export is working with SolarEdge M1 Imported/Exported kWh. What is not working is the correct display of photovoltaic and battery energy. The reason for this is that all the energy that goes into (or out of) the battery is also recorded by the I1 AC kWh energy sensor. Just removing the battery from the energy dashboard would likely resolve this, but I'd really like to see it there.... Heres a picture of the wrong powerFlow: |
Beta Was this translation helpful? Give feedback.
-
@Rai-Rai Following an example found elsewhere (sorry, don't have the link immediately to hand), I believe I've solved this by creating synthetic sensors based on the right combination of sensors provided by solaredge-modbus-multi. To do this, I added the following to the bottom of my HomeAsssistant configuration.yaml file: template:
- sensor:
- name: "Solar Panel Production W"
unique_id: solar_panel_production_w
unit_of_measurement: "W"
icon: mdi:solar-power
state: >
{% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
{% set b1_dc_power = states('sensor.solaredge_b1_dc_power') | float(0) %}
{% if (i1_dc_power + b1_dc_power <= 0) %}
0
{% else %}
{{ (i1_dc_power + b1_dc_power) }}
{% endif %}
availability: >
{{ states('sensor.solaredge_i1_dc_power') | is_number and states('sensor.solaredge_b1_dc_power') | is_number }}
- name: "Solar House Consumption W"
unique_id: solar_house_consumption_w
unit_of_measurement: "W"
icon: mdi:home
state: >
{% set i1_ac_power = states('sensor.solaredge_i1_ac_power') | float(0) %}
{% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}
{% if (i1_ac_power - m1_ac_power <= 0) %}
0
{% else %}
{{ (i1_ac_power - m1_ac_power) }}
{% endif %}
availability: >
{{ states('sensor.solaredge_i1_ac_power') | is_number and states('sensor.solaredge_m1_ac_power') | is_number }}
- name: Solar Inverter Consumption w
unique_id: solar_inverter_consumption_w
unit_of_measurement: "W"
icon: mdi:mdi:home-lightning-bolt-outline
state: >
{% set i1_ac_power = states('sensor.solaredge_i1_ac_power') | float(0) %}
{% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
{% if (i1_ac_power > i1_dc_power < 0) %}
{{ (i1_ac_power - i1_dc_power)| round(2) }}
{% else %}
{{ ( i1_dc_power - i1_ac_power)| round(2)}}
{% endif %}
availability: >
{{ states('sensor.solaredge_i1_ac_power') | is_number and states('sensor.solaredge_i1_dc_power') | is_number }}
- name: "Solar Imported Power W"
unique_id: solar_imported_power_w
unit_of_measurement: "W"
icon: mdi:transmission-tower-export
state: >
{% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}
{% if (m1_ac_power < 0) %}
{{ (m1_ac_power * -1) }}
{% else %}
0
{% endif %}
availability: >
{{ states('sensor.solaredge_m1_ac_power') | is_number}}
- name: "Solar Exported Power W"
unique_id: solar_exported_power_w
unit_of_measurement: "W"
icon: mdi:transmission-tower-import
state: >
{% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}
{% if (m1_ac_power > 0) %}
{{ (m1_ac_power) }}
{% else %}
0
{% endif %}
availability: >
{{ states('sensor.solaredge_m1_ac_power') | is_number }}
- name: "Home - Fossil Fuel"
unique_id: home_fossil_fuel
unit_of_measurement: "%"
icon: mdi:barrel
state: >
{% set home_renewables = states('sensor.home_renewables') | float(0) %}
{{ (100 - home_renewables) }}
availability: >
{{ states('sensor.home_renewables') | is_number }}
sensor:
- platform: integration
source: sensor.solar_panel_production_w
method: left
unit_prefix: k
name: solar_panel_production_kwh
- platform: integration
source: sensor.solar_house_consumption_w
method: left
unit_prefix: k
name: solar_house_consumption_kwh
- platform: integration
source: sensor.solar_imported_power_w
method: left
unit_prefix: k
name: solar_imported_power_kwh
- platform: integration
source: sensor.solar_exported_power_w
method: left
unit_prefix: k
name: solar_exported_power_kwh
utility_meter:
solar_panel_production_daily:
source: sensor.solar_panel_production_kwh
name: Solar Panel Production Daily
cycle: daily
solar_house_consumption_daily:
source: sensor.solar_house_consumption_kwh
name: Solar House Consumption Daily
cycle: daily
solar_imported_power_daily:
source: sensor.solar_imported_power_kwh
name: Solar Imported Power Daily
cycle: daily
solar_exported_power_daily:
source: sensor.solar_exported_power_kwh
name: Solar Exported Power Daily
solar_imported_power_weekly:
source: sensor.solar_imported_power_kwh
name: Solar Imported Power Weekly
cycle: weekly
solar_house_consumption_weekly:
source: sensor.solar_house_consumption_kwh
name: Solar House Consumption Weekly
cycle: weekly
solar_panel_production_weekly:
source: sensor.solar_panel_production_kwh
name: Solar Panel Production Weekly
cycle: weekly
solar_exported_power_weekly:
source: sensor.solar_exported_power_kwh
name: Solar Exported Power Weekly
cycle: weekly
solar_imported_power_monthly:
source: sensor.solar_imported_power_kwh
name: Solar Imported Power Monthly
cycle: monthly
solar_house_consumption_monthly:
source: sensor.solar_house_consumption_kwh
name: Solar House Consumption Monthly
cycle: monthly
solar_panel_production_monthly:
source: sensor.solar_panel_production_kwh
name: Solar Panel Production Monthly
cycle: monthly
solar_exported_power_monthly:
source: sensor.solar_exported_power_kwh
name: Solar Exported Power Monthly
cycle: monthly
solar_imported_power_yearly:
source: sensor.solar_imported_power_kwh
name: Solar Imported Power Yearly
cycle: yearly
solar_house_consumption_yearly:
source: sensor.solar_house_consumption_kwh
name: Solar House Consumption Yearly
cycle: yearly
solar_panel_production_yearly:
source: sensor.solar_panel_production_kwh
name: Solar Panel Production Yearly
cycle: yearly
solar_exported_power_yearly:
source: sensor.solar_exported_power_kwh
name: Solar Exported Power Yearly
cycle: yearly …and then I can use these sensors in power-flow-card-plus. This is my configuration, which includes a MyEnegi EV charger. type: custom:power-flow-card-plus
title: Power Flow
entities:
home:
entity: sensor.solar_house_consumption_w
color_icon: true
color_value: true
fossil_fuel_percentage:
entity: sensor.home_fossil_fuel
icon: mdi:leaf
color_icon: true
display_zero: true
name: Green Import
state_type: percentage
color_value: true
display_zero_state: true
secondary_info:
template: |-
{% set grid_power = states('sensor.solaredge_m1_ac_power') | float(0) %}
{% set green_pct = states('sensor.home_renewables') | float(0) %}
{% if (grid_power < 0) %}
{{ (-grid_power * green_pct / 100) | round(0) }} W
{% endif %}
display_zero: false
color_value: true
unit_white_space: false
grid:
name: Grid
entity: sensor.solaredge_m1_ac_power
display_state: one_way_no_zero
color_circle: true
invert_state: true
secondary_info:
decimals: 2
display_zero: false
template: >
{% set grid_power = states('sensor.solaredge_m1_ac_power') | float(0) %}
{% set grid_buy_price = states('sensor.home_general_price') | float(0)
%}
{% set grid_sell_price = states('sensor.home_feed_in_price') | float(0)
%}
{% if grid_power < 0 %}
{{ (grid_buy_price * 100) | round(0) }} ¢
{% elif grid_power > 0 %}
{{ (grid_sell_price * 100) | round(0) }} ¢
{% else %}
{% endif %}
solar:
icon: mdi:solar-panel-large
entity: sensor.solar_panel_production_w
color_value: true
color_icon: true
battery:
name: Battery
entity: sensor.solaredge_b1_dc_power
display_state: one_way_no_zero
color_icon: true
color_circle: true
invert_state: true
state_of_charge: sensor.solaredge_b1_state_of_energy
color_state_of_charge_value: true
individual1:
entity: sensor.myenergi_my_home_power_charging
secondary_info:
entity: sensor.maple_battery
unit_of_measurement: '%'
display_zero: true
color_value: true
color_icon: false
display_zero_state: false
individual2:
color_value: false
clickable_entities: true
display_zero_lines:
mode: transparency
transparency: 80
grey_color:
- 189
- 189
- 189
use_new_flow_rate_model: true
w_decimals: 0
kw_decimals: 1
min_flow_rate: 0.75
max_flow_rate: 6
max_expected_power: 10000
min_expected_power: 0.01
watt_threshold: 750
dashboard_link: /energy
dashboard_link_label: Energy Summary |
Beta Was this translation helpful? Give feedback.
-
I updated the gist as previously, I calculated the home consumption for each inverter independently and then summed them - which is not possible. The Home Consumption is the total AC power from each inverter minus the exported power (i.e. add the imported power). Previously I was taking the total AC power + Imported Power for each inverter and adding, which would double count the imported power. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature
Add documentation to the wiki on setting up the Energy Dashboard in HA.
Screenshots

Home Assistant (please complete the following information):
Additional context
The readme advertises support for the energy dashboard, but it's not immediately obvious which sensors to add where. For example, I'm at a loss as to which to use for the solar panels?
UPDATE:
See this comment for latest working example.
Beta Was this translation helpful? Give feedback.
All reactions