Skip to content

v2.4.0 - Battery Used Today

Choose a tag to compare

@Aresitoo Aresitoo released this 29 Oct 15:52
· 52 commits to main since this release

Battery used today

The scorecard gets a fourth row: DISCHARGED TODAY, sitting under self-consumed, grid reliance and exported. It shows the kWh your battery delivered today and that figure as a share of your load, so "I used 15 kWh of battery" comes with the context of what that meant against the house.

The battery node also carries the number under its state of charge bar, so it is visible without tapping.

Where the numbers come from

The card reads your battery's daily discharge sensor, which it already knew about:

entities:
  battery_daily_discharge: sensor.battery_discharge_today
  battery_daily_charge: sensor.battery_charge_today

Common names are auto-detected, and Wh or MWh are normalised to kWh. If your battery only reports power, build the energy sensor in Home Assistant first:

sensor:
  - platform: integration
    source: sensor.battery_power
    name: battery_energy_out
    unit_prefix: k
    method: left
utility_meter:
  battery_out_today:
    source: sensor.battery_energy_out
    cycle: daily

A missing or unavailable sensor shows -- instead of a confident 0.00 kWh, and hides the line on the battery node.

Customisation

  • Text: lbl_battery_discharged_today and lbl_battery_discharged_sub in Custom Titles & Display Names.
  • Colours: Row 4 in the Visual Colors Studio (row_battery_title, row_battery_kwh, row_battery_bar). Harmonized and Shuffle regenerate them with the other rows.
  • Default accent is the palette device colour (violet on the solar palette) so it does not compete with the green self-consumed row.
  • show_battery_row: false hides the row.
  • battery_primary_view: stats opens the battery node on today's charged and discharged totals instead of live power.

Fixed along the way

_update() treated battery-left, the default battery position, as no battery at all. On the default layout that meant the battery node's live power, state of charge, SoC bar and stats view never updated. It now matches the visibility logic that already handled that mode.

Upgrading

Nothing to change. If you have a battery and a daily discharge sensor, the row appears by itself.