UPDATED! SolarEdge Modbus full setup guide with Energy Dashboard integration for Installations with Battery connected

Hi Remko
I have a question to connect to the solaredge inverter: My one is connected to the ethernet network - but not with a IP address from my network. So I cannot see the inverter for example in the AVm router. Is the a problem to connect via Modbus?
Is it possible to write you direct (email)? I also live near to Cologne :slight_smile: Thanks a lot
Yours Alex

I have a Solar edge HD inverter, just got setapp to work and will configure mod bus, but I have no Wifi antenna, is the wifi antenna needed for this entire integration to work?

No, WiFi is not needed. I have my inverter connected to my local network and it gets an IP address from may router. I use that IP address to connect to it via modbus.

ok so if I did want to configure this integration via wifi, would the external wifi antenna need to be connected to my solar edge HD inverter?

Yes, it either needs the wifi kit or an ethernet cable

Hey Remko, did you have the chance and time to look at my graphs?

Sorry, not yet. A bit swamped in work and a construction project going on at home. One thing to understand (and it does not explain everything) is that in the configuration of the power distribution card I use the direct output of the battery1 sensor, coming from the modbus integration. This sensor does show the power output, but that is not what is being delivered to the house directly. The battery has some losses in its output and the inverter loses a bit more when converting to DC. In my calculations I use these factors when calculating the house consumption.
So… When you have a battery output of for example 500 W, what you get as usable power on your house is less, with the effectiveness of three battery varying between 75% an 95% and the inverter with about 95%, it would be around 420 W.

I use these values in the Tesla card, which is more accurate as this power distribution card. On top of that…

So this does explain minor differences, it does not explain the huge difference you had in the previous post. I will look into this, just a bit busy with some other things at the moment. Haven’t forgotten though.

1 Like

@s_ash I have been looking into this, but cannot find any error in the calculations. I did find the screenshot in post 118 strange and to me those values do not seem correct. The only explanation I have for that is that it may have been a result of some delays after just having use a lot of power. I do not see this effect, even under the same conditions. So if this is not how it normally looks, it actually should be fine.
Now what I DO see in the setup and when comparing to the SolarEdge reporting, is that there are differences, which can be explained (I think). So let me give it a go.
Let’s start with comparing the Energy Dashbooard with SolarEdge for a sunny day, where I charged my battery fully, used more power then available and in the evening consume my battery:


The first difference we see is Production. Solaredge reports 27,25 kWh and the Energy Dashboard 29,1 kWh There are 2 things going on, why there is a difference:

  1. The power production I calculate, is the actual production from the solar panels. Solaredge reports this differently, which is the reason I made this setup in the first place; When the battery is charging, the solaredge platform does not calculate this as production. If you watch the dashboard, you can see the the production does not increase when charging. It does however increase when discharging (using your battery). So in the evening, when there is no sunshine, the Solaredge reports increasing production. I do not like this effect so what you see in my case is the actual production from the panels. So there may be a difference when on one day you charge more, but the next day discharge more. On average it will be pretty similar though.
  2. There is a different thing going on with solar energy and a battery. Both the panels and the battery are DC, the grid and house are AC. So there is a conversion going on between that (the function of the inverter), however…there are losses in power when converting from DC to AC. There are also losses when using a battery. With charging and discharging there are quite substantial losses in the battery technology still, which causes that you can never use the full power which you charge into the battery. Systems have gotten pretty smart and good at it, but we still lose a lot of the energy. And this is the next nice thing about the modbus integration and the way i configured it now. It actually lets us see these…

The next main difference we see is “House Consumption”. In my configuration it is 20,3 kWh and Solaredge says 22,93 kWh.

Another big difference is Battery in and Out. Here there are 2 things going on:

  1. The time difference, it may have charged more today and I have not used that much.
  2. Again the losses going on in the system…

No to that topic of losing energy: In the modbus integration we have an “AC” sensor and the “DC” sensors. So we can actually see what goes out of the battery (sensor.solaredge_battery1_power) and what is actually being delivered to the house (sensor.solaredge_ac_power). So I spend a lot of time on this, including stuff like turning on a water cooker with exactly 1000W of power, to see what goes on in the system at what moment.
And what I found out is that we have 2 places where we lose energy:

  1. When the inverter converts from DC to AC. This is almost exactly 95% over time. This is also what the specs of the inverter state, so this is pretty good.
  2. Discharging the battery (well actually I think it could also be at charging, but this is not something I could calculate, so I am only taking this into account when discharging).

I have created sensors in my configuration which calculate the factor of loss and takes this into account when I show the battery output.
image

Here you see the effectiveness of the battery (the wild lines) and the green line, showing the average. The surprising thing to me is how low this rate actually is…as low as 60%. Average around 75%.

This effectiveness all depends on the battery management system, state of charge etc. But here you can see a certain dependency on the State of Charge of the battery:
image
image

So, what this leads to in my configuration…When the Solaredge Battery out sensor shows for example 1333W, I multiply this with the effectiveness sensor of around 75% I get the 1000 W needed for my watercooker. And checking this, this is exactly what the sensors show.

Now, how did SolarEdge do this…well, they don’t. I looked at several graphs and data over multiple weeks and if II take these effectiveness calculations it is pretty much exactly the difference between Solaredge reporting and my reporting. Their House Consumption is always a lot higher when I use the battery a lot. Also their “vom Speichersystem” value tends to be higher as mine, which is correct if you take the losses into the calculations.

The screenshots you posted are from the “Power Distribution Card” in which actually the direct modbus sensors are used. I maybe should have taken that card out, since I am not actively using that anymore. I like the tesla style a lot better and that is also a more accurate display. But again, here you can see the differences between solaredge and me too…

I hope this explanation helps and makes it more clear, if not…keep asking, I’ll do my best to answer.

@stephanschuster Still not forgotten your request…that is next on my to-do list…

@stephanschuster Maybe it is not too difficult…this is my first shot at it:


Just the daily ones for now. For Monthly and Yearly I need to add a few more utility meters, but I wanted to get your intial feedback on this. I use the “Custom Pie Chart” from the HACS store with following configuration:

type: custom:pie-chart-card
title: Self Consumption Daily
total_amount: sensor.solar_panel_production_daily
entities:
  - entity: sensor.solar_panel_to_house_daily
    name: Direct consumption
  - entity: sensor.solar_battery_in_daily
    name: Battery charging
  - entity: sensor.solar_exported_power_daily
    name: Exported power
type: custom:pie-chart-card
title: Autarkie Daily
total_amount: sensor.solar_house_consumption_daily
entities:
  - entity: sensor.solar_panel_to_house_daily
    name: Direct energy
  - entity: sensor.solar_battery_out_daily
    name: Battery consumption
  - entity: sensor.solar_imported_power_daily
    name: Imported energy

I am not too happy with the cards yet, so I will look for alternatives. Or maybe anyone here who has a better idea of creating donut cards? I would like more control over the colors and the title. I would like to use a template for the title, or someway of displaying text based on a sensor.

If will already create the required utility meters for getting weekly, monthly and yearly stats and update the first post with that.

With the added sensors in the first post:

Config:

      - type: custom:pie-chart-card
        title: Self Consumption Daily
        total_amount: sensor.solar_panel_production_daily
        entities:
          - entity: sensor.solar_panel_to_house_daily
            name: Direct consumption
          - entity: sensor.solar_battery_in_daily
            name: Battery charging
          - entity: sensor.solar_exported_power_daily
            name: Exported power
      - type: custom:pie-chart-card
        title: Autarkie Daily
        total_amount: sensor.solar_house_consumption_daily
        entities:
          - entity: sensor.solar_panel_to_house_daily
            name: Direct energy
          - entity: sensor.solar_battery_out_daily
            name: Battery consumption
          - entity: sensor.solar_imported_power_daily
            name: Imported energy
      - type: custom:pie-chart-card
        title: Self Consumption Weekly
        total_amount: sensor.solar_panel_production_weekly
        entities:
          - entity: sensor.solar_panel_to_house_weekly
            name: Direct consumption
          - entity: sensor.solar_battery_in_weekly
            name: Battery charging
          - entity: sensor.solar_exported_power_weekly
            name: Exported power
      - type: custom:pie-chart-card
        title: Autarkie Weekly
        total_amount: sensor.solar_house_consumption_weekly
        entities:
          - entity: sensor.solar_panel_to_house_weekly
            name: Direct energy
          - entity: sensor.solar_battery_out_weekly
            name: Battery consumption
          - entity: sensor.solar_imported_power_weekly
            name: Imported energy
      - type: custom:pie-chart-card
        title: Self Consumption Monthly
        total_amount: sensor.solar_panel_production_monthly
        entities:
          - entity: sensor.solar_panel_to_house_monthly
            name: Direct consumption
          - entity: sensor.solar_battery_in_monthly
            name: Battery charging
          - entity: sensor.solar_exported_power_monthly
            name: Exported power
      - type: custom:pie-chart-card
        title: Autarkie Monthly
        total_amount: sensor.solar_house_consumption_monthly
        entities:
          - entity: sensor.solar_panel_to_house_monthly
            name: Direct energy
          - entity: sensor.solar_battery_out_monthly
            name: Battery consumption
          - entity: sensor.solar_imported_power_monthly
            name: Imported energy
      - type: custom:pie-chart-card
        title: Self Consumption Yearly
        total_amount: sensor.solar_panel_production_yearly
        entities:
          - entity: sensor.solar_panel_to_house_yearly
            name: Direct consumption
          - entity: sensor.solar_battery_in_yearly
            name: Battery charging
          - entity: sensor.solar_exported_power_yearly
            name: Exported power
      - type: custom:pie-chart-card
        title: Autarkie Yearly
        total_amount: sensor.solar_house_consumption_yearly
        entities:
          - entity: sensor.solar_panel_to_house_yearly
            name: Direct energy
          - entity: sensor.solar_battery_out_yearly
            name: Battery consumption
          - entity: sensor.solar_imported_power_yearly
            name: Imported energy

I am not too happy yet with these cards as they seem to lag a bit and make the UI slow. But…at least it displays what you wanted to see. I used the service “calibrate utility meter” to set all the values for the month and year based on the solar edge monitoring platform.

Found a new setup, which is a bit cleaner:

You have to install the “Lovelace Card Templater” and the “apexcharts-card” from HACS and then you can use following configuration to get this:

Daily, weekly, monthly and yearly stats…

      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: Autarkie Daily - {{states('sensor.solar_autarkie_ratio')}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_daily
                  name: Direct energy
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_daily
                  name: Battery consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_daily
                  name: Imported energy
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Daily -
                  {{states('sensor.solar_selfconsumption_ratio')}}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_daily
                  name: Direct consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_daily
                  name: Battery charging
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_daily
                  name: Exported power
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2
      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: >-
                  Autarkie Weekly -
                  {{((((states('sensor.solar_panel_to_house_weekly')| float(0))
                  + (states('sensor.solar_battery_out_weekly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_weekly')| float(0)) +
                  (states('sensor.solar_battery_out_weekly')| float(0)) +
                  (states('sensor.solar_imported_power_weekly')| float(0)))) *
                  100) | round (0)}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_weekly
                  name: Direct energy
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_weekly
                  name: Battery consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_weekly
                  name: Imported energy
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Weekly -
                  {{((((states('sensor.solar_panel_to_house_weekly')| float(0))
                  + (states('sensor.solar_battery_in_weekly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_weekly')| float(0)) +
                  (states('sensor.solar_battery_in_weekly')| float(0)) +
                  (states('sensor.solar_exported_power_weekly')| float(0)))) *
                  100) | round (0) }}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_weekly
                  name: Direct consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_weekly
                  name: Battery charging
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_weekly
                  name: Exported power
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2
      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: >-
                  Autarkie Monthly -
                  {{((((states('sensor.solar_panel_to_house_monthly')| float(0))
                  + (states('sensor.solar_battery_out_monthly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_monthly')| float(0)) +
                  (states('sensor.solar_battery_out_monthly')| float(0)) +
                  (states('sensor.solar_imported_power_monthly')| float(0)))) *
                  100) | round (0)}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_monthly
                  name: Direct energy
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_monthly
                  name: Battery consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_monthly
                  name: Imported energy
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Monthly -
                  {{((((states('sensor.solar_panel_to_house_monthly')| float(0))
                  + (states('sensor.solar_battery_in_monthly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_monthly')| float(0)) +
                  (states('sensor.solar_battery_in_monthly')| float(0)) +
                  (states('sensor.solar_exported_power_monthly')| float(0)))) *
                  100) | round (0) }}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_monthly
                  name: Direct consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_monthly
                  name: Battery charging
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_monthly
                  name: Exported power
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2
        square: true
      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: >-
                  Autarkie Yearly -
                  {{((((states('sensor.solar_panel_to_house_yearly')| float(0))
                  + (states('sensor.solar_battery_out_yearly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_yearly')| float(0)) +
                  (states('sensor.solar_battery_out_yearly')| float(0)) +
                  (states('sensor.solar_imported_power_yearly')| float(0)))) *
                  100) | round (0)}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_yearly
                  name: Direct energy
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_yearly
                  name: Battery consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_yearly
                  name: Imported energy
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Yearly -
                  {{((((states('sensor.solar_panel_to_house_yearly')| float(0))
                  + (states('sensor.solar_battery_in_yearly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_yearly')| float(0)) +
                  (states('sensor.solar_battery_in_yearly')| float(0)) +
                  (states('sensor.solar_exported_power_yearly')| float(0)))) *
                  100) | round (0) }}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_yearly
                  name: Direct consumption
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_yearly
                  name: Battery charging
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_yearly
                  name: Exported power
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2

A very beautiful work. How do I get my sensors integrated there. I get my values via the API web interface. I get these values:

That would require a different setup of the configuration. The Web Api gives different sensors and values, which requires basically, going through every formula and adapting that. Since I don’t have the Web API setup anymore, it is a bit difficult thing to do for me.

It can be done, but it is a big puzzle…:wink:

@stephanschuster

And I made the config with the same colours as on the website you linked:

    cards:
      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: Autarkie Daily - {{states('sensor.solar_autarkie_ratio')}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_daily
                  name: Direct consumption
                  color: rgb(251, 109, 3)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_daily
                  name: Battery consumption
                  color: rgb(215, 7, 7)
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_daily
                  name: Imported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Daily -
                  {{states('sensor.solar_selfconsumption_ratio')}}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_daily
                  name: Direct consumption
                  color: rgb(23, 53, 119)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_daily
                  name: Battery charging
                  color: rgb(35, 107, 57)
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_daily
                  name: Exported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2
        square: false
      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: >-
                  Autarkie Weekly -
                  {{((((states('sensor.solar_panel_to_house_weekly')| float(0))
                  + (states('sensor.solar_battery_out_weekly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_weekly')| float(0)) +
                  (states('sensor.solar_battery_out_weekly')| float(0)) +
                  (states('sensor.solar_imported_power_weekly')| float(0)))) *
                  100) | round (0)}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_weekly
                  name: Direct consumption
                  color: rgb(251, 109, 3)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_weekly
                  name: Battery consumption
                  color: rgb(215, 7, 7)
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_weekly
                  name: Imported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Weekly -
                  {{((((states('sensor.solar_panel_to_house_weekly')| float(0))
                  + (states('sensor.solar_battery_in_weekly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_weekly')| float(0)) +
                  (states('sensor.solar_battery_in_weekly')| float(0)) +
                  (states('sensor.solar_exported_power_weekly')| float(0)))) *
                  100) | round (0) }}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_weekly
                  name: Direct consumption
                  color: rgb(23, 53, 119)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_weekly
                  name: Battery charging
                  color: rgb(35, 107, 57)
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_weekly
                  name: Exported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2
        square: false
      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: >-
                  Autarkie Monthly -
                  {{((((states('sensor.solar_panel_to_house_monthly')| float(0))
                  + (states('sensor.solar_battery_out_monthly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_monthly')| float(0)) +
                  (states('sensor.solar_battery_out_monthly')| float(0)) +
                  (states('sensor.solar_imported_power_monthly')| float(0)))) *
                  100) | round (0)}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_monthly
                  name: Direct consumption
                  color: rgb(251, 109, 3)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_monthly
                  name: Battery consumption
                  color: rgb(215, 7, 7)
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_monthly
                  name: Imported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Monthly -
                  {{((((states('sensor.solar_panel_to_house_monthly')| float(0))
                  + (states('sensor.solar_battery_in_monthly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_monthly')| float(0)) +
                  (states('sensor.solar_battery_in_monthly')| float(0)) +
                  (states('sensor.solar_exported_power_monthly')| float(0)))) *
                  100) | round (0) }}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_monthly
                  name: Direct consumption
                  color: rgb(23, 53, 119)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_monthly
                  name: Battery charging
                  color: rgb(35, 107, 57)
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_monthly
                  name: Exported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2
        square: false
      - type: grid
        cards:
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              header:
                show: true
                title_template: >-
                  Autarkie Yearly -
                  {{((((states('sensor.solar_panel_to_house_yearly')| float(0))
                  + (states('sensor.solar_battery_out_yearly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_yearly')| float(0)) +
                  (states('sensor.solar_battery_out_yearly')| float(0)) +
                  (states('sensor.solar_imported_power_yearly')| float(0)))) *
                  100) | round (0)}}%
                show_states: false
                colorize_states: true
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              series:
                - entity: sensor.solar_panel_to_house_yearly
                  name: Direct consumption
                  color: rgb(251, 109, 3)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_out_yearly
                  name: Battery consumption
                  color: rgb(215, 7, 7)
                  show:
                    legend_value: false
                - entity: sensor.solar_imported_power_yearly
                  name: Imported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
          - type: custom:card-templater
            card:
              type: custom:apexcharts-card
              update_interval: 1min
              chart_type: donut
              apex_config:
                plotOptions:
                  pie:
                    donut:
                      background: transparent
                      labels:
                        show: true
                        total:
                          show: false
              header:
                show: true
                title_template: >-
                  Selfconsumption Yearly -
                  {{((((states('sensor.solar_panel_to_house_yearly')| float(0))
                  + (states('sensor.solar_battery_in_yearly')| float(0))) /
                  ((states('sensor.solar_panel_to_house_yearly')| float(0)) +
                  (states('sensor.solar_battery_in_yearly')| float(0)) +
                  (states('sensor.solar_exported_power_yearly')| float(0)))) *
                  100) | round (0) }}%
                show_states: false
                colorize_states: true
              series:
                - entity: sensor.solar_panel_to_house_yearly
                  name: Direct consumption
                  color: rgb(23, 53, 119)
                  show:
                    legend_value: false
                - entity: sensor.solar_battery_in_yearly
                  name: Battery charging
                  color: rgb(35, 107, 57)
                  show:
                    legend_value: false
                - entity: sensor.solar_exported_power_yearly
                  name: Exported energy
                  color: rgb(166, 166, 166)
                  show:
                    legend_value: false
            entities:
              - sensor.time
        columns: 2
        square: false

Anybody got success to get it working with a SolarEdge HD Wave 6000 ?
I have it on the network both on Wi-Fi and Ethernet.

Installed SolarEdge modbus and it doesn’t fetch any data from either IP

Is there a step I missed ?

You would have to check with the original thread or installation instructions for the integration. It does require Modbus to be enabled on the inverter.

Hey Remko,

thank you for your very detailed answer and your time investigating these (my) issues!

i think i’ve understand anything of your Answer. But what is not 100% clear to me, is that in your previus config these values are 100% accurate and 1:1 comparable to the web app. Now these values differ. And they only differ, if the battery is giving Energy to the house, not in the other Direction!

I’ve tried to catch the difference in making two Screenshots at the same time. Are you sure, that the calculation now is “better” than the calc was before?


The values displayed in your screenshots are actually correct, the SolarEdge Portal is not.

You can actually see the effect: The Battery Output is 598 W, Solaredge shows this as 0,6 kW. So that value is the same, it is what the battery is actually outputting.

The value for house consumption is lower, this is where you see that you have losses when converting from DC (battery) to AC (house consumption). Solaredge chooses to ignore this in their display. I think because 99% of the customers would not understand it, nor do they want to see this. I do, that is the entire reason I made this configuration…:wink:

In my previous config, I used the same sensors as SolarEdge for the display in Lovelace, that is why the values were the same as Solaredge. Now it is more correct…:wink:

Hi Remko, first of all thank you for your work, I really appreciate it.
At the moment I’ve just one question: You always speak about losses when converting from DC to AC. My setup has a AC battery connected to the inverter. Is your calculation also applicable here? Thanks!

Hmmm…that is interesting. There may be some problems in the calculations then. I don’t know if you have the same sensors from the modbus integration as I have. Maybe you could post the list of solaredge sensors you have. I can have a look at it and see if there are differences. There should be differences if the battery is AC connected.