bramstroker / homeassistant-powercalc

Custom component to calculate estimated power consumption of lights and other appliances
MIT License
899 stars 251 forks source link

Photovoltaic is giving negative output (this is wanted) #2151

Closed Stephan-4711 closed 2 months ago

Stephan-4711 commented 3 months ago

System Health details

Core 2024.3.2 Supervisor 2024.03.0 Operating System 12.1 Frontend 20240307.0

Checklist

Describe the issue

Logger: homeassistant.components.sensor.recorder Quelle: components/sensor/recorder.py:324 Integration: Sensor (Dokumentation, Probleme) Erstmals aufgetreten: 12:20:11 (1 Vorkommnisse) Zuletzt protokolliert: 12:20:11

Entity sensor.pv_messung_energy from integration powercalc has state class total_increasing, but its state is negative. Triggered by state -81.1451 with last_updated set to 2024-03-22T11:14:59.999999+00:00. Please create a bug report at https://github.com/bramstroker/homeassistant-powercalc/issues

Reproduction steps

  1. use a PV and a shelly em
  2. ...

Debug logs

I gues it's not needed

Diagnostics dump or YAML config

No response

bramstroker commented 3 months ago

What are you trying to do exactly? Wat exactly did you setup using powercalc and how?

Powercalc is not purposed to do anything with solar panels.

Stephan-4711 commented 3 months ago

I want to messure how many kwh my solar panels have produced. I thought this is an easy thing with powercalc, exxept of that error.

bramstroker commented 3 months ago

Powercalc group sensor can only handle positive values. No plans to support this use case, sorry.

You can easily achieve this with a standard template sensor summing all your solar panels.

bramstroker commented 3 months ago

Or are you not using group sensor and do you have a sensor in Watt you want to convert to kWh?

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 5 days with no activity.