Tesla Wall Connector v3 home assistant integration with session data too

@epenet I wonder if you could implement from vitals-api also the session_energy_wh and session_s. As those enable much easier seeing of charging events, instead of just logging total TWC energy. There are like 20 items or so I wonder why those are not logged all, like under temps have multiple sensors like handle, mcu etc.

What I mean is by graphics like below (I hope it is visible). This graph is from my own configuration.yaml RESTful API implementation.

also improved data could be compiled on polling & storing time, like power per phase and total power with all phases added together. With that you could have charging power but also battery and cabin preheat powers.

I don’t know why you contact me. I don’t use this component.

Sorry, I though you created the component by quickly looking latest edits on sensors.py…

Naturally I’d like to contact the author of the component.

Look at the manifest.json to look for codeowners.

Hi,
I just installed the Tesla Wall Connector and used the corresponding Integration. Most interesting for me would be the energy consumed in the current session and a calculated cost (ideally from an energy source from the energy dashboard)

any chance of seeing this added @einarhauks ? (as per manifest.json) I’d also be comfortable adding a pull request but im not sure where to start - id be my first homeassistant component edit and first python code in a long time

well that was easy - I added a draft pull request: Add Session Energy for Tesla wall connector by LukasGrebe · Pull Request #63742 · home-assistant/core · GitHub
i don’t know how to test locally and other test things. Could someone help out?

Great, would you @afiwube also do the “watt” maths implementation. As the voltage per phase and current per phase are available at API, and also create 4th data object with total power by summing power per phase.

From my configuration.yaml rest-implementation:

      - name: "TWC charging power A"
        value_template: "{{ (float(value_json.voltageA_v) * float(value_json.currentA_a)) | round(0) }}"
        device_class: power
        unit_of_measurement: W
      - name: "TWC charging power B"
        value_template: "{{ (float(value_json.voltageB_v) * float(value_json.currentB_a)) | round(0) }}"
        device_class: power
        unit_of_measurement: W
      - name: "TWC charging power C"
        value_template: "{{ (float(value_json.voltageC_v) * float(value_json.currentC_a)) | round(0) }}"
        device_class: power
        unit_of_measurement: W
      - name: "TWC charging power total"
        value_template: "{{ (float(value_json.voltageA_v) * float(value_json.currentA_a) + float(value_json.voltageB_v) * float(value_json.currentB_a) + float(value_json.voltageC_v) * float(value_json.currentC_a)) | round(0) }}"
        device_class: power
        unit_of_measurement: W
2 Likes

Hey @afiwube,
Have you finalized your code? I’m eagerly awiting to see it in the release! I’m really currious about session numbers, and would be also great if TWC would show up on HA Energy Dashboard.

@denxhun you could create from helper’s a “daily utilitymeter” with official TWC integration’s Wh-figure.

I tried this and it creates a “sensor.tesla_wall_charger” entity. How do I make it compatible to work with the HA energy dashboard?

Hey the code in the pull request was when i last touched it.

Edit: also, its giving me in between updates while charging, wich was my original problem that it would only update once unplugged. Thats no longer happening.

I didnt finish through because i dont know how to set up and run the integrated software tests, wich is necessary for merging the code.

So if you know how to set up HA testing, or could point me to a tutorial, feel free to re-initiate the pull request/ share the tutorial.

Cc @frenck (?)

I also would like the extra info:
http://10.0.0.134/api/1/wifi_status
{“wifi_ssid”:“UGxhbmV0IEV4cHJlc3M=”,“wifi_signal_strength”:66,“wifi_rssi”:-57,“wifi_snr”:39,“wifi_connected”:true,“wifi_infra_ip”:“10.0.0.134”,“internet”:true,“wifi_mac”:“98:ED:5C:D6:94:3E”}

http://10.0.0.134/api/1/version
{“firmware_version”:“23.24.3+gba52398ee0bc71”,“part_number”:“1xxxx8-02-H”,“serial_number”:“B7S2xxxxxxxx”}

http://10.0.0.134/api/1/vitals
{“contactor_closed”:true,“vehicle_connected”:true,“session_s”:2631,“grid_v”:236.1,“grid_hz”:59.881,“vehicle_current_a”:24.6,“currentA_a”:11.4,“currentB_a”:13.2,“currentC_a”:13.3,“currentN_a”:11.4,“voltageA_v”:240.6,“voltageB_v”:240.4,“voltageC_v”:118.4,“relay_coil_v”:6.1,“pcba_temp_c”:39.1,“handle_temp_c”:24.0,“mcu_temp_c”:34.6,“uptime_s”:862355,“input_thermopile_uv”:-1192,“prox_v”:1.5,“pilot_high_v”:0.0,“pilot_low_v”:0.0,“session_energy_wh”:4255.500,“config_status”:5,“evse_state”:11,“current_alerts”:[]}