This epaper display shows me all the information I need to keep an eye on my power wall
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