Try to detect failure solar panel

I have solaredge solar panels that can be traced by HA 2024.1.2. It can track current Amps, Volts and lifetime power. Trying to find a way to detect or alert of any of panel failure or low performance. Attached is graph of one panel. It is similar to others. Any idea or method can be used to detect a panel not in similar charts?

If you have a lux sensor you can calculate the actual efficiency of the PV array compared to the theoretical. All you need is the lux value, the area of the array and the theoretical efficiency of the panels. Then you can make a template sensor. Here’s the sensors for my two strings of PV panels, it will not be valid for your system:

template:
  - sensor:
      - name: "PV A Efficency"
        unit_of_measurement: "%"
        icon: 'mdi:solar-power-variant-outline'
        state: >
          {% if states('sensor.outside_light_level')|float(0) > 0 %}
            {{ ( 100 * states('sensor.pv_power_a')|float(0) / (states('sensor.outside_light_level')|float(1) * 0.074) )|round(0,default=none) }}
          {% else %}
            unknown
          {% endif %}
        availability: "{{ states('sensor.outside_light_level')|float(0) > 0 }}"

      - name: "PV B Efficency"
        unit_of_measurement: "%"
        icon: 'mdi:solar-power-variant-outline'
        state: >
          {% if states('sensor.outside_light_level')|float(0) > 0 %}
            {{ ( 100 * states('sensor.pv_power_b')|float(0) / (states('sensor.outside_light_level')|float(1) * 0.074) )|round(0,default=none) }}
          {% else %}
            unknown
          {% endif %}
        availability: "{{ states('sensor.outside_light_level')|float(0) > 0 }}"

Plotted in Grafana:

If the panels are new and not shaded at all you can calbrate this to be 100% at solar noon in summer, I didn’t bother which is why it shows over 100% efficiency. It does not matter. All I am looking for is a drop in efficiency.

I also compare the output power of one PV string to the other, you can see there is quite a bit of shading on one string in winter:

Thanks. A bit too complex for me