Tesla Wall Connector Power Sensor

The Tesla Wall Connector integration provides the voltage and current for each phase, but does not provide a power sensor. I’m currently using a template sensor…

    - name: 'Tesla Wall Connector Power'
      icon: mdi:lightning-bolt
      device_class: power
      state_class: measurement
      unique_id: "power_tesla_wall_connector"
      state: "{{ (states('sensor.tesla_wall_connector_phase_a_voltage')|float * states('sensor.tesla_wall_connector_phase_a_current')|float
                + states('sensor.tesla_wall_connector_phase_b_voltage')|float * states('sensor.tesla_wall_connector_phase_b_current')|float
                )|round(0) }}"
      unit_of_measurement: "W"

But, the integration should be able to do this just as easily.

I can’t vote for something that HA already provides.

My Wall Connector integration does not provide a Power entity. You’re saying that your’s does?

No, but HA does provide a way, so it is already there.

I don’t think every HA user should be expected to know how to template to get basic sensor information like power from an EV charger. I suspect this was a simple oversight and an equally simple fix.

5 Likes

I second this. Would be great to have it in the integration. This value is already displayed in the Tesla App so maybe this value already is available in the api.

3 Likes

Templating is a basic skill in HA.

Read the first line, then read it again.

Clearly the expectation is not for everyone to learn Jinja.

2 Likes

Yeah but people get to templating eventually. It is very powerful, and IMHO is a skill we all should learn. It is not that freaking hard.

I don’t disagree that it’s a good skill to learn and the basics of templating are straightforward. 2023.9 added the ability to template basic sensors as helpers in the UI even.

But, just because it’s possible doesn’t mean there’s not a better way. We can just disagree on what “better” might be in this case.

1 Like

It would be great to get a current power and daily energy as sensors for integration into energy cards etc. As a new user, it would be great to have these, as templating is not something i am comfortable with

I copied a power template from another thread, and edited for 3 phase. But i still need to work out a daily energy sensor.

    - name: 'Tesla Wall Connector Power'
      icon: mdi:lightning-bolt
      device_class: power
      state_class: measurement
      unique_id: "power_tesla_wall_connector"
      state: "{{ (states('sensor.tesla_wall_connector_phase_a_voltage')|float * states('sensor.tesla_wall_connector_phase_a_current')|float
                + states('sensor.tesla_wall_connector_phase_b_voltage')|float * states('sensor.tesla_wall_connector_phase_b_current')|float
                + states('sensor.tesla_wall_connector_phase_c_voltage')|float * states('sensor.tesla_wall_connector_phase_c_current')|float                
                )|round(0) }}"
      unit_of_measurement: "W"

Thanks for sharing this. I’ve copied and pasted your formula here and it’s almost correct. Specially my Telsa app shows 9.8 kW, but the templates value is 11,949 W (11.9 kW). I don’t know enough about the calculation formulas. Did this eventually work out for you?

At any point in time, there may be disagreements between the template and Tesla app due to polling and server response delays, but yes the formula (Ohm’s law) is correct.

The only adjustments necessary would be to add Phase C for those who use 3-phase power. Other comments address this, but since your example noted a lower power in the Tesla app, that’s probably not your discrepancy. Maybe just wait for the charging to settle out after plugging in and see what readings you get steady state.

I might be wrong, but I think that there is always ~10% difference between the energy displayed in the app and an actual mesure of the energy taken on the grid. If I understand it correctly, the energy displayed in the app is the energy added to the car battery, and there is ~10% of loss in the process. Maybe someone has more info on this and can confirm?

Yes, it seems so, some insights here: https://teslamotorsclub.com/tmc/threads/app-charge-stats-dont-agree-with-my-electric-meter.302849/

Good morning everyone, the issue with the inaccurate calculations is that the power factor isn’t being taken into account, which, at least in my case, is always quite different from the theoretical “1”. Therefore, it would be necessary for the integration to at least provide the power factor data; otherwise, the template calculations are completely wrong.

Hi guys,

my wall connector work just fine but when its idle (unplugged from car) I have all the time on phase A voltage 6.3V and current 0.4A.

What do you think is that? Leakage? Self consumption for idle? Or just an error?