Open Geliras opened 1 year ago
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:
Yes thats right, but i found a work-around with input_number
@Geliras mind sharing with us?
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 '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 :) )
Is there a way for a sensor that will always show the total_production even if the inverter is offline?