Victron VRM Daily kWh consumption entity

This epaper display shows me all the information I need to keep an eye on my power wall :blush:
The display is connected to a Wemos D1 mini.

Daily kWh consumption is extremely useful in HA (Home Assistant), I searched the available Victron Modbus registers and couldn’t find one that contained the information required, I could only find total consumption. After some creative thinking I figured out how to use two HA Helpers and two Automations to store “sensor.discharged_energy” in a variable at midnight (input_number.discharged_energy_at_midnight), then using that variable to calculate a second variable (input_number.ac_today) that represents the daily discharged energy “AC Today” at 10 second intervals .

Automation 1 - store “sensor.discharged_energy” into Helper entity/variable "input_number.discharged_energy_at_midnight " at midnight .

1. service: input_number.set_value
2. data:
3. value: '{{ states(''sensor.discharged_energy'') |float |round(1) }}'
4. target:
5. entity_id: input_number.discharged_energy_at_midnight

Automation 2 - calculate "input_number.ac_today " alias (AC Today) entity/variable.

1. service: input_number.set_value
2. data:
3. value: >-
4. {{ ((states('sensor.discharged_energy') |float -
5. states('input_number.discharged_energy_at_midnight') |float ) | round(1)) }}
6. target:
7. entity_id: input_number.ac_today

Maybe someone can improve on this approach, suggestions are welcome :slight_smile:

My daily consumption is in the region of 2Kwh with a Multiplus 5000W always on, some tech gadget, outdoor night lights a freezer.

myPennMedicine

Have you integrated daily consumption into Home Assistant yet? I so, what method did you use? Cheers