Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

adding the &c1=1 flag is not always correct

Abierto
#11 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
api

Línea de trabajo

Start by locating the condition that appends &c1=1 when gen_state_class is total or total_increasing, then inspect how the entity id and state metadata are available. Done means daily-reset values such as sensor.growatt_inverter_growatt_2_today_s_solar_energy omit the flag while lifetime energy values retain it.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I have a growatt inverter with a ShineWiLan-X2 datalogger.
The inverter gets read with the SolaX Inverter Modbus integration in home assistant.
The values i use to upload to pvoutput are: Today's solar energy and output power.
The value Today's solar energy is a running total per day gets reset to 0 at 0:00 in the night.
Because the code only looks at if gen_state_class in ["total", "total_increasing"]: the flag payload += "&c1=1" gets appended.
But in this case because it resets at night this is not correct. In the api documentation is states that:
Cumulative Energy

The following values are valid for the c1 flag.

    1 - Both v1 and v3 values are **lifetime** energy values.

    2 - Only v1 generation is a **lifetime** energy value.

    3 - Only v3 consumption is a **lifetime** energy value.

In my case it is not a lifetime value and the flag should not be added.
I don't have a solutions on how to correct this. Maybe look for the value today in the entitiy id. The entity id is sensor.growatt_inverter_growatt_2_today_s_solar_energy

Image Image Image

I just commented out the addition of the flag. and that works for me.

Lenguaje dominante
Python
Estrellas
5
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SourceLabOrg/HomeAssistant-PVOutputPublisher

Todos los issues de SourceLabOrg/HomeAssistant-PVOutputPublisher

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.