Energy Dashboard Add Electric Car consumption

Integration with two electric cars should be nice.

This would be super to have!

For the time being, I use the battery integration for my EV. In order to have a “0 kWh” value for unloading the battery, I created a default value with the powercalc integration:

  - platform: powercalc
    name: unload_battery
    daily_fixed_energy:
      value: 0.00

As I don’t have solar, I also created a default value “0 kWh”. otherwise battery consumption is not subtracted from the overall consumption and house consumption shows the same value as overall consumption.

In case you have another work around, let us know…

4 Likes

thinking about the same…

having a PV it obviously would be interesting as well how much of the EV’s charge came from one’s own roof. (gotta try @schneemensch’s approach if this can visualize that for now)

thinking further - the same thinking as for BEVs would be true for other ‘big’ consumers … like heat pumps

3 Likes

I agree, as the big consumers modify the scale of the bar chart significantly…

Thanks a lot for sharing this “trick”.
So you used the “battery_sim” integration from HACS.

I defined the following code in configuration.yaml

battery_sim:
  auto_batterij:
    name: auto batterij
    import_sensor: sensor.laadpaal_real_power_sum    # this is the sensor of my charging station
    export_sensor: sensor.unload_battery
    max_discharge_rate_kw: 11.0
    size_kwh: 90.0
    energy_tariff: 0.30

And I applied your trick for the battery and solar panels (which I do not yet have)

  - platform: powercalc
    name: unload_battery
    daily_fixed_energy:
      value: 0.00

  - platform: powercalc
    name: zonnepanelen_sim
    daily_fixed_energy:
      value: 0.00

All this makes different sensors.
In the energy dashboard in the battery part I added:
auto batterij - battery energy in
unload_battery

Is this correct the correct way? I am asking, because in the graphs the battery shows negative values for auto batterij - battery energy in

Thanks

actually - no. we used the built in battery function of the energy dashboard. but it seems to work similarly.

yes, power going to a battery shows as negative value, i guess as it’s assumed this power should come back again to the home(grid) at some point (adding positively to the statistics then).

1 Like

btw… not quite what the energy dashboard does, but there’s an app (err… card) for that:

2 Likes

Would be really nice.

Here I got a flat rate contract for free power to my car at home, but the charger runs through the same meter as the rest of the house. Then once a month, the company subtract the charger kWh from the rest, and send a bill separately for the kWh consumption for the house, and a separate fixed bill for the free charging.

So if I use 1000 kWh total and 400 kWh is for the car, the bill would be 600 kWh for the house, and no matter how much I charge the car, the bill for that would be the same, ie. €100

As for now, I’m using the grid return, but it could be nice with a separate option for electric car :smiley:

Hi, I am planning to use the “battery” option of the Energy Dashboard for my electric car, too - when it finally arrives … :smiley:

I am not sure, why you need to change the “unload_battery” daily_fixed_energy with 0.00 - I would like to see the behave when this isn’t set…
But considering, that “return2grid” or “return2home” will probably come within a few years for battery based cars, I think havin this implemented into the battery itself would be the best solution atm.

On the other hand:
IF you do have a battery - and want to charge your car from that battery, the configuration might be a bit difficult, because you would add both into one “component”

Do you have ideas for this case (even if it does not apply in my case…)

1 Like

Well, in general a battery charged as well as discharged, so this is why you have to add both values to the configuration I guess. As the discharge process of the car happens to the car not being attached to the wallbox, I gave it the “0” value in order to be able to add the car as a battery.
On your second point: I’m not sure if the configuration is difficult at all, you just add a second battery (besides the car) an it monitors what goes an comes…
As you can tell by my post, I have only little knowledge about all this. maybe someone else can elaborate on this topic.
Hopefully we get the Car integration for the powerpanel soon…
You all have a nice day!

I would also love to see this functionality added to the HA energy dashboard. I intend to purchase the Shelly 3EM but would love to know if this is actually considered on the roadmap

Know this is an old thread but has anyone figured out how to add car and get the costs

Here I use the Export in the energy dashboard, and I get the price from the NordPool plugin.

I get the total consumption from an HA Glow (don’t got an smart meter with P1/HAN port) and for the car, I have an LK PowerTag on the relay for the charger.

This way works quite well for me, as I pay flat-rate for the power I’m using at home for my car.

So I get something like this

yes, the “basic” measurement is pretty simple - since EV charging is either grid import - or it comes from your solar power.

This is how I have it done atm:

EV Charging - mostly from Solar production…

EV Charger listed in single devices:

But: I think, it would be great if the Car could be added as a specific device - like a house battery.
The major difference here is, that you can load your house-battery - and later unload it…
That will be shown different in the charge…

It might be a bit difficult to implement it in the chart itself, because somehow the system would require to know, if the energy came from your solar - or from the grid.
If it does not know this, it would show the consumption from your solar (or the grid import) + the charging itself (added on top)

I guess, that could be hard to differenciate and will cause major complains from the community - even more, if the charging will be done by SOLAR + IMPORT

BUT:
having a dedicated information in this area, as already requested somewhere (I don’t remember, if it was in this topic, or another FR)
grafik

That would be nice… at least, it could be shown how much energy you have put in your car - but it could probably not show from what source it was…

1 Like

Is there anything we can do to get this properly done in the Energy Dashboard? I tried a WTH and another tried this but it doesn’t seem to get any traction. My feeling is that with a little development on the HA side this could be a great feature, especially in managing the optimum time for charging and getting a grip on your costs. Any thoughts?

2 Likes

You can also create a dummy value with a template sensor:

- template:
  - sensor:
    - name: "Battery unload dummy"
      unique_id: battery_unload_dummy
      unit_of_measurement: "kWh"
      device_class: energy
      state_class: total
      state: "{{0.0|float}}"
1 Like

hm… I had another thought about this topic…

I think, there are different approaches and cases that should be considered when discussing the integration of an EV into the energy dashboard, because there are some edge-cases that can happen compared to a house-battery…

Housebattery:
most probably a single device (or two) bind to the household that can be charged - and discharged.

EV:

  • Amount of “n” Cars possible.
  • Battery charging → by solar or grid import
  • Battery discharging → by driving, not used for HouseConsumption
  • Battery discharging → by HouseConsumption if “vehicle to grid” will be available (depending on your location, etc.)
  • Measurements can come from the EV or from the Charging-Station or from a Shelly…
  • EV can be charged everywhere else ( → can be difficult to measure in combination with vehicle to grid, for example)

Also, in addition to that:
Since charging your EV is already part of your house consumption (total) it is already included within the graph.
The only way to get “proper” information is to add the device (charging station) as single device…

But then, it will not be possible to configure when vehicle to grid" will be available…

I think, since there are so many different options this is something that won’t be possible as a general
implementation… The solution with powercalc or whatever might work in some (maybe most) cases as of today… but I really see a high risk of implementing such things today - when there are certain things that are yet unknown… and might be change drastically in the next 2 years maybe?`

2 Likes

Another vote. Would be nice to have it separately on the energy dashboard.

2 Likes

Another consideration with electric cars: Has anyone found a good way to only report charging (ie energy consumption) when the car is “home”? I haven’t figured out how to accomplish this yet: When i charge my car somewhere other than at home, that energy usage still shows up on the Energy Dashboard, which incorrectly implies I consumed that energy from my home, rather than elsewhere (public charger, work charger, friends house, etc).

Perhaps there’s a way to use a Helper or Template to say something to the effect of “if vehicleLocation !=‘home’ ignore energy usage”. Or, even better, put that usage in a different bucket, where one could track both charging usage at home, vs “other”.