Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensor.today_s_pv_generation reset to zero during the day #328

Open
zhouska opened this issue Nov 21, 2024 · 0 comments
Open

sensor.today_s_pv_generation reset to zero during the day #328

zhouska opened this issue Nov 21, 2024 · 0 comments

Comments

@zhouska
Copy link

zhouska commented Nov 21, 2024

I see some odd issue when it comes to 'today_s_pv_generation' sensor. It seems to reset itself to zero at odd times (when PV panels produce):

image

I can't put my finger on the issue, as the sensor seems to be tracking 'e_day' sensor from goodwe (https://github.com/marcelblijleven/goodwe/blob/65ed2309b5434198bd56594bc40108abf3d93fd2/goodwe/et.py#L131) and it seems being reset every day as well:

image

I suspect it is some buffer value overflow on inverter's side, but I'm wondering if some kind of a wrapper could be put in place natively?

I have this sensor defined in HA:

- name: "PV Generation Wrapper"
      unique_id: pv_generation_wrapper
      unit_of_measurement: "kWh"
      state: >
        {% set original_sensor = 'sensor.today_s_pv_generation' %}
        {% set current_reading = states(original_sensor) | float %}
        {% set last_state = this.state | float(0) %}
        {% set last_updated = this.last_updated.strftime('%Y-%m-%d') %}
        {% set today = now().strftime('%Y-%m-%d') %}
       
        {% if last_updated != today %}
          {{ current_reading | round(3) }}
        {% elif current_reading < last_state %}
          {{ (last_state + current_reading) | round(3) }}
        {% else %}
          {{ current_reading | round(3) }}
        {% endif %}

It works perfectly well, but a native solution would be preferred.

I use GW10K-ET inverted with 111127 firmware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant