EV Charging Station as a special device (costs/usage)

I have a EV Charging station and it is a public one. So when someone uses it, I gain a fixed amount of money per kWh. The power that goes into the charging station can come from my battery, my solar panels or the grid. So sometimes that power costs money, sometimes it is ‘free’.

At the moment, I have set my charging station up in HA as a ‘return to grid’. That way I can monitor the costs. The only downside is that the graphs and some energy counters get screwed up because it is ‘returning to the grid’.

It would be nice if we could select a device, add a positive of negative cost to it per kWh and select if it is external or internal.

Where internal means => a more detailed view of costs of a specific in-house device. For example: the heat exchanger costs me x money or my daughters’ heater on her room makes me a broke man. This does not change the global counters; just an extra detailed counter.

And external => a device that ‘sells’ of ‘buys’ energy. This does have an influence on the global counters. It is not send back to the grid, it is not in a battery, but consumed or gained and we have payed or received money for it.


An example for my situation:

My solar panels generated 32kWh and I consumed 16kWh from the grid. (48kWh together)

My home battery of 10kWh got charged completely by solar and 6kWh was consumed before midnight. Nothing special, but 4 of the 48 kWh is still there; so we have a 44kWh left.

The house used 16kWh; 28 kWh is left.

As you can see, I returned about 16kWh and the EV charged with about 12kWh.

You can also see I gained 2,70 € that day.
Looks nice, right?

But…

Self-sufficiency score is 1% (how can this be when only 34% comes from the grid and 66% comes from solar? - guess because the EV is seen as a return to grid)
self-consumed solar is 14% (also way off because the EV is seen as a return to grid)

and on the graph, the solar disappears; I would like to have the bars when charging cars on the top side since it is consumption.

image

also the energy distribution shows the EV as return to grid. (obviously since this is the only way to do it right now)
image

This would also be a HUGE help to a lot of companies that have multiple charging stations.