Tesla Powerwall - Sensors Unavailable or Reporting Battery Charge Higher Than Tesla App

I’m using a Tesla Powerwall 2 and have had no issues adding the integration into HA, but I do see 2 issues that I’ve been unable to troubleshoot for sensor accuracy and availability.

  1. Powerwall Charge in HA is 4% higher than what’s in the Tesla app (except when 100%) - e.g. I keep 20% reserved for emergencies, so when the Tesla app shows 20%, HA shows 24%.

EDIT: I navigated directly to my Powerwall via IP and see that the UI in the browser matches what it is in HA, but not the Tesla App. I’ll follow up with Tesla on this mismatch.

  1. The Powerwall Load Export and Powerwall Solar Import sensors are “Unavailable” - it seems like others get data from these sensors. How can I get these to report data? Or what would be preventing it from being available?

Any ideas as to what’s making these sensors report information greater than the app? And what can I do to fix the Unavailable sensors? Starting here before submitting a bug report in case it’s something specific to my configuration.

My powerwall does exactly the same with the charge data.

I think it is because the actual capacity of the battery is 4% bigger than the useable capacity. Whoever programmed the app made a correction - presumably the api guy didn’t. Not too bad once you know about it.

I also have a powerwall II and I do not see the 4%. My sensor reads 20% the same as the powerwall reads. My system was commissioned in April.

Interesting…

My gateway software is 22.18.3 21c0ad81
It was commissioned in late Feb this year

Possibly falls into my ‘life is too short’ class but interested if your software version is different.

Cheers

Same software based on the 22.18.3 21c0ad81. If I hover over the version on the tesla gateway 21c0ad8143c appears below the version number in the pop up window.

I think they are the same. I am running two batteries.

I have two systems to peer into working. I have a PVS6 from sunpower to control the microinverters and shut off a contactor if the grid goes down and I can’t accept all the charging from the panels. The subpanel for the battery and solar panels then goes to the gateway. I have a very large system +15kW so that may have something to do with it. My PVS6 and Gateway are slightly different but it is within a few watts.

Weird.
Had a proper look at my sensor values in HA (I’m new to HA so lots to get my head around)
Actually only get the 4% offset when the battery is down to its reserved for power cuts level - 20% reserved HA shows 24%
At other charge levels get smaller offsets - currently Tesla app is showing 45% and HA 47%

Think this is going on the low priority list - I can work round it.
Thanks for responding

Tesla Tier 2 Support tells me that the mobile app is the official and the APIs & Web UI are incorrect… I’ve gotten absolutely nowhere with them on this, but I think the theory of the extra unusable reserve is probably what’s happening. So their end-user focused system is “correct” whereas the backend ones are accurate.

Is there an easy way to fix the value on the integration with HA to reflect when it’s really at 20% and it shows 24%?

I asked Tesla about it too - this is the reply

“The discrepancy between the Tesla App and the browser view is normal and related to a small delay on data transmission on the Tesla App.
The browser version is more detailed, but still provides less additional information and is usually used mainly by our installers.
Customers normally should use only the Tesla App as monitoring system.
The Backup Reserve percentage indicated in the browser-based monitoring system therefore also shows the security percentage present in the Powerwall internally.
We therefore advise you to use the Tesla App as your main monitoring.”

The small delay argument I struggle to believe - it’s contradicted by the backup reserve bit.

It is what it is - life is too short!

I ended up reporting this as an issue for the official Tesla Powerwall HA integration since I noticed custom integration provided 2 charge sensors (one for the APP value and one for the API value), so I was wondering how we could get the official integration to report it there.

In doing some more research, I found a reddit post where someone determined the formula used to convert the two values, which appears to be due to the backup reserve. That formula and reddit link are in the issue I linked above. Sharing in case anyone else is looking for more information on this.

Bingo here too. Still a problem in Sept 2023. I searched and found this thread as I am having the same problem. Life is too short however it’s one of those things that will beat up a data-minded person (me lol). I push my 2x PW down to the 10% bottom reserve limit on some high consumption days. I do this because my plan has free electricity starting at 8pm so I use up as much of the battery I can before I’m charged trying to get to a zero dollar monthly bill. For the most part it works and it’s accomplished through automations that control consumption as the battery gets down to the bottom. That’s why the accuracy is important in my use-case. Technically I could drop the limit down to 6% which I think may be the bottom-bottom that the app allows you to set the reserve.

Wish there was a sort of calibration to be set in HA similar to a temperature sensor.

Im curious what ever happened with this? I noticed that the GitHub issue opened never actually fixed the issue. Does the work-around mentioned below still a good work-around?

Formatting is messed up, I’m on my phone.


sensor:name: "powerwall_charge_actual"
unique_id: "powerwall_charge_actual"
state_class: "measurement"
unit_of_measurement: "%"
device_class: "battery"
state: >-
{% set percent = ((states('sensor.powerwall_charge') | float(0) / 100.0) - (0.05)) / (0.95) %}
{{ percent * 100 }}`

Yes seems none of the battery data has been working for awhile, a least 1 month. Solar, grid, home all report, but there must have been key names changes that no one has spoken up about or fixed in the Home Assistant Powerwall integration. If you look at the energy dashboard, you will see nothing reported for the Battery/Powerwall section.

That is odd. I am on the following versions:

Screenshot from 2023-12-07 14-20-00

I run HA on a virtual machine.

Here is my energy dashboard for today.

Has a yaml file been corrupted?

Here’s what I’m using and it still matches the Tesla app.

- sensor:
  - name: "powerwall_charge_actual"
    unique_id: "powerwall_charge_actual"
    state_class: "measurement"
    unit_of_measurement: "%"
    device_class: "battery"
    state: >-
      {% set percent = ((states('sensor.powerwall_charge') | float(0) / 100.0) - (0.05)) / (0.95) | float(0)%}
      {{ (percent * 100) | round(1) }}