core icon indicating copy to clipboard operation
core copied to clipboard

SolarEdge "Solar Power" not choosable at "Energy" for Solar Production

Open dawosch opened this issue 2 years ago • 13 comments

The problem

Hey, i have the "SolarEdge" Addon installed and want to setup the "Energy" Dashboard with the SolarEdge Entities.

The Energy Dashboard wants the entity with energy i'm importing, the entity with energy i'm exporting and the entity with energy i'm generating with my solar panels.

The first and second entity i'm able to select

  • sensor.solaredge_imported_energy
  • sensor.solaredge_exported_energy

I think the third entity should be the "sensor.solaredge_solar_power" entity. But i'm not able to select this entity.

What version of Home Assistant Core has the issue?

Home Assistant 2022.7.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

SolarEdge

Link to integration documentation on our website

https://www.home-assistant.io/integrations/solaredge/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

dawosch avatar Jul 29 '22 07:07 dawosch

Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (solaredge) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Same here, ha version 2022.8.6. out of 21 sensors only sensor.solaredge_current_power available and pulling and sensor.solaredge_lifetime_energy is unknown. all others disable pulling using solaredge python module manually seems to be working as expected

update: API calls seems to be working from HA and manually enable sensors populate the data

kfirsa avatar Aug 19 '22 05:08 kfirsa

Same issue here - The Energy Dashboard wants the entity with energy i'm importing, the entity with energy i'm exporting and the entity with energy i'm generating with my solar panels.

The first and second entity i'm able to select

sensor.solaredge_imported_energy sensor.solaredge_exported_energy I think the third entity should be the "sensor.solaredge_solar_power" entity. But i'm not able to select this entity.

sebking1971 avatar Oct 03 '22 08:10 sebking1971

Likewise. The sensor.solaredge_current_power which would be the sensor value for the current production of the panels cannot be selected as a sensor to use for the energy dashboard.

kdw2060 avatar Oct 27 '22 18:10 kdw2060

I found my way here for the same reason this issue was opened and I've been trying to figure out a workaround / solution. I noted that the sensor.solaredge_solar_power entity goes +/- depending on power in/out from the battery. I created two new templated entities to capture those values as positive floats.

sensor:  
  - platform: template
    sensors:
      solaredge_battery_depletion_rate:
        friendly_name: "SolarEdge Battery Depletion Rate"
        unit_of_measurement: kW
        device_class: energy
        value_template: > 
          {% set power_in_out = states('sensor.solaredge_storage_power') | float %}
          {% if  (states('sensor.solaredge_storage_power') | float) < 0 -%}
          {{(states('sensor.solaredge_storage_power') | float) * -1}}
          {%- else -%}
          0
          {%- endif %}
        icon_template: mdi:lightning-bolt
      solaredge_battery_charge_rate:
        friendly_name: "SolarEdge Battery Charge Rate"
        unit_of_measurement: kW
        device_class: energy
        value_template: > 
          {% set power_in_out = states('sensor.solaredge_storage_power') | float %}
          {% if  (states('sensor.solaredge_storage_power') | float) > 0 -%}
           {{(states('sensor.solaredge_storage_power') | float)}}
          {%- else -%}
            0
          {%- endif %}
        icon_template: mdi:lightning-bolt

I then used the "Integration - Riemann sum integral" configured as "Left" to create my energy in and out entities.

after restarting HA, I was able to select those items for battery in/out, however I've no idea how accurate this is yet or if it's working properly. it is however collecting some sort of data!

I do get a warning on the Energy battery page even though it is collecting data as follows. I am not sure exactly what type it wants/needs.

Unexpected device class
The following entities do not have the expected device class:
sensor.battery_energy_out
sensor.battery_energy_in

Noodleyman avatar Dec 06 '22 08:12 Noodleyman

@Noodleyman what did you put for the other settings in the "Riemann sum integral" integration for the sensor? Like Precision decimals, metric prefix and time unit?

uprisingchuns avatar Dec 23 '22 04:12 uprisingchuns

Morning,

An excellent question! I seem to recall using two decimal places and I believe I left everything else as default.

The code block I posted before isn't fully working, I will go back and figure out what it needs to be when time allows in the new year. It's along the right path, just not fully there yet.

Noodleyman avatar Dec 23 '22 08:12 Noodleyman

I see only one entity (and wrong one) - instead of other solaredge 21 entities:

image

mellaiz avatar Jan 01 '23 17:01 mellaiz

@Noodleyman Were you able to get this to work.

MechEng70 avatar Feb 26 '23 19:02 MechEng70

Kind of... it's not perfect but it's as close as I can get it for now with limited time to screw about with it.

This is what I have in place at the moment, but I'm using the SolarEdge App most of the time rather than HA. I contacted SolarEdge about local API access, and was essentially told to do one. I asked about API limits being increased for more frequent updates, but was again essentially told to stop bothering them.. fun!


  - platform: template
    sensors:
      solaredge_battery_depletion_rate:
        friendly_name: "SolarEdge Battery Depletion Rate"
        unit_of_measurement: kW
        device_class: energy
        value_template: > 
          {% set power_in_out = states('sensor.solaredge_storage_power') | float %}
          {% if  (states('sensor.solaredge_storage_power') | float) < 0 -%}
          {{(states('sensor.solaredge_storage_power') | float) * -1}}
          {%- else -%}
          0
          {%- endif %}
        icon_template: mdi:lightning-bolt
      solaredge_battery_charge_rate:
        friendly_name: "SolarEdge Battery Charge Rate"
        unit_of_measurement: kW
        device_class: energy
        value_template: > 
          {% set power_in_out = states('sensor.solaredge_storage_power') | float %}
          {% if  (states('sensor.solaredge_storage_power') | float) > 0 -%}
           {{(states('sensor.solaredge_storage_power') | float)}}
          {%- else -%}
            0
          {%- endif %}
        icon_template: mdi:lightning-bolt

Noodleyman avatar Feb 27 '23 09:02 Noodleyman

I noted as well, when chargint the battery from mains it counts as "consumed from battery" so something isn't right

Noodleyman avatar Feb 27 '23 09:02 Noodleyman

@Noodleyman appreciate the starting point.

MechEng70 avatar Feb 27 '23 14:02 MechEng70

Same here. I can only choose 'sensor.zonnepanelen_lifetime_energy'. Which is even worse, since we need power and not energy! I can't use the workaround because I have no battery. Is there any progress for this issue? It's open for 7 months now and there is no comment by @frenck yet. Kind regards, Jos

JosWennmacker avatar Mar 01 '23 00:03 JosWennmacker

Ok, I found this solved issue: SolarEdge integration entities not available in ENERGY dashboard #58029

@frenk's solution there is also the solution for this issue:

The lifetime sensor is suitable for the energy dashboard and enabled for it.

In the energy dashboard the lifetime sensor provides the other values.

For me the issue has been solved. Kind regards, Jos

JosWennmacker avatar Mar 02 '23 20:03 JosWennmacker

@JosWennmacker Are you sure about that?

My todays production is: 3.1 kW image

My HomeAssistant Config: image

And the dashboard shows: image

You see that the Solar value is the same as my todays production, not my current production. My current production is 0.17 kW.

dawosch avatar Mar 13 '23 15:03 dawosch

@dawosch That is exactly what the dashboard is intended to show you: todays energy split up in 1) your production so far today, 2) usage from the grid so far today AND your return to the grid so far today and 3) your total energy consumption so far today. The 0,17 kW is the power from your solar panels at this moment, not energy (kWh) but power (kW). To see the power you have to create your own card, like:

image

JosWennmacker avatar Mar 13 '23 16:03 JosWennmacker

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.