home_assistant_solarman icon indicating copy to clipboard operation
home_assistant_solarman copied to clipboard

Show total_production when inverter is offline

Open Geliras opened this issue 2 years ago • 2 comments

Is there a way for a sensor that will always show the total_production even if the inverter is offline?

Geliras avatar Oct 13 '22 21:10 Geliras

Hi Geliras, do you mean if your inverter is off by night? Inverters without battery usually shut down when the panels don't produce electrical power (at night) therefore you won't retrieve data from your inverter because he is offline or the other way you can't check the inverter log, because the build in logger is offline. Ways to check your total_production even the inverter is offline:

  1. connect your inverter to an online monitoring platform (usually provided by your inverter supplier)
  2. receive data on a local monitoring platform in your local network (e.g. homeassistant, openhab and smaller solutions). You have to find out if the inverter supplier allows to receive inverter data on a local platform or if the community build a software to do this (decoded the data provided by an interface).

honikos avatar Oct 23 '22 07:10 honikos

Yes thats right, but i found a work-around with input_number

Geliras avatar Oct 23 '22 18:10 Geliras

@Geliras mind sharing with us?

VaillantHassIo avatar Nov 10 '22 14:11 VaillantHassIo

I found a workaround. In my configuration.yaml I added a custom sensor template and I added this to the energy dashboard, and removed the solarman sensor. This will change your data and remove your solardata from dashboard: I think the value availability is the one, which is needed during night times.

template: 
    - sensor:
        - name: "Ertrag Pergola Total (kWh) custom"
          unique_id: solarman2mppt_total_production_custom
          unit_of_measurement: kWh
          icon: mdi:solar-power
          device_class: energy
          state_class: total_increasing
          state: "{{ states('sensor.solarman2mppt_total_production')|float(default=0) }}"
          availability: "{{ states('sensor.solarman2mppt_total_production')|is_number }}"

distancerunner avatar Mar 14 '23 07:03 distancerunner

@distancerunner 's workaround did not work for me. I'm not sure why not, but I got the following as a workaround. Effectively checking if the current value is greater than 0, if so, use that value, if not, keep the current value.

    - name: "Solarman Total Production 1-1"
      unique_id: solarman_total_production_1_1_custom
      unit_of_measurement: kWh
      icon: mdi:solar-power
      device_class: energy
      state_class: total_increasing
      state: >
        {% if states('sensor.solarman1_total_production_1') | int > 0 %}
        {{ states('sensor.solarman1_total_production_1')|float(default=0) }}
        {% else %}
        {{ states('sensor.solarman_total_production_1_1')|float(default=0) }}
        {% endif %}

Background: I use a Deye 2-port-microconverter with the deye_2mppt.yaml file. The combined total production doesn't reset, but the individual ones do. Hence I have the above workaround. I of course could also use the combined one, but I like to keep everything specific to each panel (because I can :) ) afbeelding

lenwar avatar May 16 '23 13:05 lenwar