Yes, but that is a translation issue and I would call it “energy charged” in german. If it had been in english added energy would made have sense but I guess that would also be called charged energy.
Regarding your question:
my previous impression had been that it resetted when we had unplugged the car.
The longer I looked the more I thought that you could be right that connecting the car could reset the charger from the previous sessions value.
So I am not sure and I and the car are not at home so no chance to test that right now since end of the holidays.
Therefore I had looked into the previous months which had a bit different pattern I think I can remember with longer charging breaks. Usually the car is always connected to charge surplus energy from the solar roof cause our 20 kWp array can only charge the home battery with max. 3 kW and then the car will be charged if it is connected.
do you have a sensor available to see if the car is connected or disconnected? (maybe something like binary_sensor.wallbox_pulsarplus_161183_cable_connected)
if you have one, you could overlay it with the charged energy graph to find out the exact moment of reset.
Ok,
I did not find a sensor that matches anything like a cable .
Here is a status overlay and in this case it looks like charging or new connection has started the reset. You can always see the red charging state and the green which means waiting for car demand.
when you have the car at home, maybe try to plug in the car and start a session and some time later stop the session and unplug the car to find out when the reset happens.
I am not at home but I know now for sure, that the car has been unplugged yesterday evening and has been driven away for a week, but the sensor still shows the value from the last connect and charging on monday of 9,12 kWh
I guess I would have to store the value of the sensor for 20 seconds or so and then check if the value then is still the same or smaller.
If it is smaller I would have to add the old value as the charged energy to an input_number to get an increasing counter which I then could use with those helpers (counter that reset each day, week , month ,year) .
this is what I use to add up energy to get a total:
# added energy total
- trigger:
- platform: state
entity_id: binary_sensor.wallbox_pulsarplus_161183_cable_connected
from: 'on'
to: 'off'
action:
- service: input_number.set_value
entity_id: input_number.added_energy_total
data:
value: >
{% set a = states('input_number.added_energy_total') | float %}
{% set b = states('sensor.wallbox_pulsarplus_161183_zusatzliche_energie') | float %}
{{ (a + b) }}
I use an input_number instead of a sensor because I find it more stable than a sensor. (sensor sometimes resets itself to 0 for unknown reasons)
So you have to make an input_number helper first, in this case called added_energy_total.
This code uses the status of the car cable connect sensor, but since you don’t have such, you will need something else.
Hope you find this useful.
Well,
I have not checked that now , but I understand what you mean.
My idea was also to use an input number and an automation to increase the input number every time the car get connected.
But my problem was the kind of trigger cause I had thought once connected the value of the last charged would have been replaced with zero and I did not know how to get the value of added energy from 10 seconds before the car had been connected again.
But I will try that out cause it looks like that the automation kicks in before the zusatzliche energy would be reset to 0
Therefore I hope that this work. I have not worked with such triggers before.
Thanks a lot.
P.S.: I have used these input numbers to count the Oil consumption of our oil condensed heater which is based on the time the heater is running. If the rocket burner starts I cound the time over the day and I know from the past and Heater counter the amount of operation hours and the oil consumption from the past 20 years which means for us 2.25 Liter per hour. And to get a nice graph and archive I write each midnight the daily values into input_number which I then use for a sensor as input. And this sensor can be used for the daily / weekly / monthly counters. Worked great so far, quite reliable especially in cases when usual sensors do not work.
Is this solution an automation or part of a triggered sensor in configuration.yaml ?
I think it is from the configuration.yaml cause automatioins do not allow such “# added energy total” description lines and remove those if I remember right.
I am not at home so I am a bit limited but how can I use “from any state” to “Charging”?
Do I need the line from or can I use only "to: charging’’ as in the example below
Is platform: state right for such sensor with multiple values ?
# added energy total
- trigger:
- platform: state
entity_id: sensor.wallbox_pulsarplus_161183_status_beschreibung
from: ''
to: 'Charging'
action:
.......
Charging = ORANGE
Waiting for car demand = RED = means connected and car is fully charged.
Ready = BLUE means “not connected”
Disconnected = GREEN
Usually the short GREEN disconnection sections yesterday are caused by a WiFi connection loss cause it happened out of nowhere aorund 17:20 3 times and also later in the evening while connected and in the middle of the night where no one has been in the garage for sure cause that would trigger the alarm.
it is indeed part of a triggered sensor and not from an automation.
your trigger is correct but I suggest to count the added energy at the end of your charge session, not in the beginning, because the value of the added energy will be reset to 0 when you start the session/connect the car.
so you need to use ‘Ready’ instead of ‘Charging’ in the trigger.
but the problem is when the state of your sensor.wallbox_pulsarplus_161183_status_beschreibung goes from disconnected back to Ready, it also will trigger the action to add up the energy.
therefore you’ll need to exclude somehow the transition from disconnected to ready from the trigger.
I think this is possible, but I’m not sure how to.
I guess maybe something like this:
# added energy total
- trigger:
- platform: state
entity_id: sensor.wallbox_pulsarplus_161183_status_beschreibung
not_from: 'Disconnected'
to: 'Ready'
action:
I had thought to switch to charging speed as the indicator like drops below 1 kW then update input_number and add added energy.
But as I had told you before, the connection issues could cause trouble cause I had checked it on a daily basis and found such disconnect during a charge where the charging speed would drop below 1 kW and then increase again while the added energy counter continues to count from same level (there is a protection for that in the wallbox internal added energy counter cause its reset is working differently then the range added counter).
And to make sure I finally added on top the STATUS sensor too
Now it has become even far more tricky cause as you can see in the 2nd charge there was a short red charging session, followed by a short disconnect at 20:10 and followed by the next charging session while the energy counter has not been resetted.
A new connection and a new charge should have reseted the counter, but the line went straight horizontally to increase again after 2 minutes or so.
I also found a counter quite similiar which is “added range”, but that was not so precise and again misleading , cause when the range drops where the mouse is pointing then the energy has been added so this sensor is also not usefull
1 real Wallbox kWh counter
2 added_energy_0015 updated every minute at 00:15 with added_energy value
3 added_energy_0045 updated every minute at 00:45 sec as a backup
If the status sensor goes from charging to anything else then
1 real counter will be updated by adding the value of input_number.added_energy_0045 if that is > 0 otherwise I would use 0015 if that is > 0
I guess I have to do that dynamically based on the current time which sensor comes first.
If the second of the current minute is < 15 I start with input_number0045
If that is 0 I can go back and chekc input_number0015
But it becomes really complicated and I wonder why the do not add the value they have already on wallbox.com account in the cloud. There is the full value of every day available.
Is it right that i paste your code simply under the template section and then that will not create a new sensor but update the input_number ?
If so I could add a those timed trigger to copy the added engery value into my at :15 into the input_number0015 and at :45 into the input_number0045 as a backup. If charging would end in the same second where added energy would be resetted I would get 0 energy added from the current input sensor , but the older one should still have the value.
This code has to be copied under the template section, right ?
# added energy total
- trigger:
- platform: state
entity_id: sensor.wallbox_pulsarplus_161183_status_beschreibung
from: 'Charging'
action:
- service: input_number.set_value
entity_id: input_number.added_energy_total
...
I guess I have found a sensor that can fit. It is a sensor that allows to pause and continue a charge and that feels like the “cable connected” sensor.
If that is not ON the sensor turns into grey cause you can not pause / resume.
I guess that it should work with a trigger from “Ein” to nothing
yes, I have seen that but as you can see in the grey box it says “unavailable” and next to it “Ein”, which indicates that this unavailable can cause such ending, but I guess it might be easier by checking a combination of EIn and Status.
If Ein and Status “waiting” then add the added energy to the counter.
If Ein ends and charging speed is below 1 kW then add the added energy…
I will then also need a “switch” that remembers the last added amount of energy.
That way I can avoid to add a second time. Will be a bit trial and error.
yes, it is worth a try if I am in the garage with a car.
Not sure when automation is better or not cause I have no big experience with template triggers. I was barely able to recognice the similiarity and that the automation has a different structure or keywords.
quite disappointing that the core integration is not supporting these elementary things. I had brought that up months ago and many said it was more or less an easy job, that the kWh counter is not necessary and what not.
Thanks a lot I hope to try it on the weekend but I will have to fix a lot of other things before.
Has anybody else compared the ‘Added Energy’ sensor readings with their Utility Meter?
We have recently purchased a Kia EV5 with an 88kWh battery, so the need for larger charging sessions has become apparent. Here are the readings I got from a recent charging session just under 35 kWh:
Wallbox says 34.954 kWh
Utility Meter says 40.88kWh
Therefore, the Wallbox reads low by 16.7%!
I knew there was an error, but didn’t realise it was so large. Wallbox Charging Power also reads low - in my case about 10% lower than reported by the EV.
It’s wonderful to have an EV with an app at last, after having a Nissan Leaf imported from Japan where the app didn’t work in our country.