mcgaleti
(Mcgaleti)
January 13, 2024, 12:52pm
1
Hi Everyone,
I can’t figure out where is my mistake. Could you give me some help?
So, my Tesla App says yesterday I have used 34kWh during my charge.
Tesla Integration Sensor (Power) says I used 34kW during that period of time
I created this template to get the value in kWh
- platform: integration
source: sensor.charger_power
name: tesla-charger_kwh
round: 2
and
- platform: statistics
entity_id: sensor.tesla-charger_kwh
state_characteristic: mean
sampling_size: 20
and
sensor.tesla-charger_kwh:
last_reset: '2024-01-13T00:00:00+00:00'
device_class: energy
unit_of_measurement: "kWh"
state_class: total_increasing
But when I check the kWh entity I see yesterday I have used 0.03 kWh ! I can’t figure out why I don’t see 34 kWh.
Appreciate your help
starob
January 13, 2024, 1:47pm
2
It seems there is an issue with W vs KW. If you divide 34 kW by 1000 and round it by 2 you get 0.03.
mcgaleti
(Mcgaleti)
January 13, 2024, 5:38pm
3
Yep ! But I don’t why and what’s wrong ….
parautenbach
(Pieter Rautenbach)
January 14, 2024, 12:20pm
5
You cannot integrate kWh (well, you can, but it will have an odd unit of kWh^2 that I’ve never seen). If you want totals, use a utility meter with the appropriate period. Or, take the Tesla kW sensor, if there is one, and integrate that. That one you can compare with the integration’s one. Why are you duplicating what you already have?
mcgaleti
(Mcgaleti)
January 14, 2024, 12:51pm
6
Hi @parautenbach the Tesla Integration only has a Power Sensor in kW like other lights and plugs I have.
So what I am doing for all of them is to convert them in kW/h using the template I mentioned above as the Energy Dashboard requires kW/h.
Right, I see you’re integrating over power. I looked poorly the first time. One thing to do is to set the integration method to left.
1 Like
mcgaleti
(Mcgaleti)
January 15, 2024, 6:02pm
8
Hey Peter, everyone,
This “left” solved my problem. Thank you very much !!!
1 Like