Add battery to energy dasboard

The new energy dashboard is pretty cool. Some people are already have batteries in their homes to save the energy.
Could you please add battery support.
Example from the sonnen app:
https://play-lh.googleusercontent.com/vojTQhlrn9LyuPpjSEBXtl9BXs6OM0xJEdTspf9Y7BcVEH066rq95glUNNmXlD6SpF8=w1920-h976-rw

Great Idea :+1:
That would help me a lot too.
My solar System in my Garden is Battery only & PV, no Grid.

Yes please. My energy dashboard is currently quite confused about exactly how much energy is coming from where.

Totally need this! Local system here is split: Solar and battery OR grid consumption. No feeding to the grid in any circumstances, just feeding the battery with excess solar power, and only if there is not enough solar and the battery is empty we will switch to grid connection. This seems to be somewhat of a challenge for the dashboard

1 Like

We are totally off the grid. So for us to make use of the energy dashboard it would need to integrate / show / track an energy storage system (batteries in our case) and make a grid connection optional.

Same here. No feeding to the grid at all. Batteries are central to our setup here. Please add batteries.

hear hear. there is a definite need to add storage/battery as an ‘energy source’ in the dashboard. in the meantime, just displaying sensors that count the kwh feeding in and out of my battery banks.

As the maintainer of the Growatt component for HASS, the addition of a battery (ideally charging & discharging) is essential IMO.

1 Like

This would be really helpful.

Currently I have configured it so my Powerwall import is a device and it’s export is grid but with unit price of 0.0

This kind of works for looking at rough daily costs, but would be much better if we could configure import/export for a battery and possibly show current percentage SoC also?

2 Likes

Good day to you and Happy New Year.
I’m trying to add sensor to my energy dashboard, but it does not appear in my drop down menu.
I’m powering my home from hybrid inverter, which has MODBUS connection to my HA.
I get readings on current flowing to my batteries and battery voltage, so I have added template into my configuration figuring out estimate wattage flowing into the battery:

      # Calculate battery energy
      battery_energy_charging:
        unique_id: battery_energy_charging
        unit_of_measurement: 'W'
        value_template: "{{ states('sensor.current') | float * states('sensor.battery_voltage') | float }}"
        
  - platform: integration
    source: sensor.battery_energy_charging
    name: battery_energy_accumulated
    unit_prefix: k
    round: 2
    method: left

Then I used platform integration to calculate w/h so I can reflect it as energy pumped into the battery.
I did the same for solar panels and they appear in my drop down menu for solar energy.

  - platform: integration
    source: sensor.power
    name: solar_energy_generation
    unit_prefix: k
    round: 2
    method: left

So what is wrong, why I can’t see battery wattage?

UPDATE:
Fixed it by customizing entity:
in file edit section navigated to configuration.yaml and added the following:

homeassistant:
...blablabla...
  customize:
    sensor.battery_energy_accumulated:
      state_class: total
      source: sensor.battery_energy_charging
      unit_of_measurement: kWh
      device_class: energy
      icon: mdi:chart-histogram
      friendly_name: battery_energy_accumulated

1 Like

Is this working for you to see exactly how much power went into the battery, out of the battery and how much your solar panels generated?
I’m trying to integrate my battery to HA but it’s really confusing

is this working. im inn a trouble. please help me . i have 24v battery and i know discharging current. i want to as a battery. plz help