Add support for Tesla Powerwall

Yeah its still the same if the car is awake as well.

Curious,

Could I ask you to raise an issue in GitHub so we can track more formally for you?

Sure il llook to do this shortly, im just ruling out its not me first.

I did have a failed tesla gateway which was replaced, which keeps re-appearing in my tesla app - when this happens all the integrations do appear to go wrong.

Tesla has confirmed theres an issue with the app around this - so waiting for confirmation first. (TeslaMate for the car is working perfectly) - but the Tesla Custom app cant see the car or the powerwall.

Great work guys on getting this to work…thank you. A couple of questions

  1. what time delay can I expect when after issuing an instruction in HA for it to be acted on in the battery?
  2. How can I tell if I have installed the “dev” version? I selected it when downloading the repository but cannot see evidence that I actually have the correct version (despite it working)?
  3. What further development is likely or should I use what we have now as the basis for my automations?
  • what time delay can I expect when after issuing an instruction in HA for it to be acted on in the battery?

Pretty much the commands should be applied instantinous, you should see the values change the the app straight away.

  • How can I tell if I have installed the “dev” version? I selected it when downloading the repository but cannot see evidence that I actually have the correct version (despite it working)?

The dev version has now been replaced with version 3.0.0 and apove, so if you are running that or a later version you are on the right track.

  • What further development is likely or should I use what we have now as the basis for my automations?

There are a few additional endpoints, which maybe implemented, but this was very much an opportunity to restructure into something that is more extendable for the future. If there are any specific endpoints you would like, drop a feature request into the issues section in github.

thanks for your reply Mark. Now looking good and I have started adding a few automations. I am keen to “EXPORT @ xyzWatts” - not sure if that is already possible? but I’ll add it in the feature requests as you suggested.

Mike

Yes fine control over the powerwall export and import would be great. Interestingly I can set the charging rate for my vehicle to a specific charging_amps value, but for the powerwall there are only three modes available via the Tesla API and thus available via this integration.

To setup export @ xyv Watts we need to lobby Tesla to expose that functionality.

Amber (and others) must have access to this as they are able to direct my battery under the “smart shift” functionality. Telsa are painful in how they mistreat end customers!

Hi, I’m struggling with this.
I have a Model Y and Powerwall on the same account. But when setting up and keeping both vehicle and energy store options ticked it only finds the car and not the Powerwall.
I have the Powerwall already added via the standard Tesla Integration. This is a local integration so I assume that won’t affect anything having both?
I’ve looked through the other posts on this thread but am a bit lost as to how else to setup the Powerwall so I can control reserve percentage etc.

I finally got this working after an age of trying using your steps via the developer service
I get the same Failed to setup alert on my integration.
Errors below. Any idea how to resolve?

Also, is there the ability to change the Grid Charge option under advanced options from yes to no via the API?

I have an energy tariff (Intelligent Octopus) which has a set 6 hour cheap rate, but it will also charge outside of this time period based on grid load. I cant find a setting between time-based and self powered where during this time I’m charging the car 100% from the grid and not putting any charge into the battery.

Logger: homeassistant.config_entries
Source: config_entries.py:372
First occurred: 16:14:22 (1 occurrences)
Last logged: 16:14:22

Error setting up entry Tesla Gateway for tesla_gateway
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 372, in async_setup
result = await component.async_setup_entry(hass, self)
AttributeError: module ‘custom_components.tesla_gateway’ has no attribute ‘async_setup_entry’

Amber (and other energy retailers) have access to a Tesla VPP API that provides much finer control. Would be great for others to have access to this API as well so we can control our hardware.

The Powerwall Grid Charging option is available in the Tesla Custom Integration, which appears to be different to the one you have installed.

Hi
Thanks

For some reason that integration doesn’t find my powerwall, only my model Y. Even though they’re both under the same account in the Tesla app.

If you turn on debug you can see which devices it’s is accessing:

logger:
  default: warning
  logs:
    teslajsonpy: debug
    custom_components.tesla_custom: debug

Sorry for the ignorance, but where do I put that code? In the config.yaml? And where do I see the output? Is this any different from enabling debug logging by clicking the three dots on the device in settings in the UI? Where does this log get saved?

I’m trying to use some of these scripts and found that tesla_gateway.set_operation is not valid? Not sure if i missed something posted but should I hardcode with device_id: instead?

What do you see in the developer tab and services if you search for Tesla?

Only API and Polling Interval. Do I need the dev version? I have v3.9.1

Does this post help?

I’m using the old method which has those services shown above. The 3.9.1 version you installed should work as it superseded the dev version.

I think using the device Id directly is fine tbh - this worked last night to interact with Octopus Energy Intelligent Time Slots. I change the value depending on whether the cheap rate is enabled or not.

  - device_id: <<SNIP!>>
    domain: number
    entity_id: number.powerwall_backup_reserve
    type: set_value
    value: 100