weltmeyer / ha_sonnenbatterie

Homeassistant integration to show many stats of Sonnenbatterie
GNU General Public License v3.0
56 stars 28 forks source link

Energy new at HA 2021.8 #6

Closed Jelleverley closed 3 years ago

Jelleverley commented 3 years ago

Hi, I have installed the latest version of HA 2021.8 Unfortunately, the sonnebatterie data is not recognized by HA as power management. Is it possible that the integration was not designed for this?

Update: I found what the entity needs to be availible in Energy : state_class: measurement last_reset: 1970-01-01T00:00:00+00:00 unit_of_measurement: kWh device_class: energy

weltmeyer commented 3 years ago

Hi Jelleverley, as this integration only measures Power (Watts) and not Energy(WattHours) it wont ever show up in the energy dashboard :)

What you can do/what i have done is to use the power sensors to a rieman integral sensor (https://www.home-assistant.io/integrations/integration/)

Example for consumption(Creates sensor for ConsumptionEnergy named "PowerConsumption" with unit kWh and usable in energy-dashboard: ` - platform: integration

source: sensor.sonnenbatterie_XXXXXX_meter_consumption_4_2_w_total

name: PowerConsumption

unit_prefix: k`

Jelleverley commented 3 years ago

Ok, i'v done it the same way whit the integration