Repository navigation
Battery Tesla Powerwall
Battery connections · Connection methods and sensors · Configuration index
Choose the battery during initial setup. Later, use Settings > Devices & Services > PowerSync > Configure > Battery connection method & sensors to choose its telemetry/control route. Edit connection details under Configure > Tesla API connection.
When returning from Amber Smart Shift or another battery backend, complete Configure > Change battery / control method > Tesla, then choose your Tesla energy site from the connected account when prompted. The site must be saved before PowerSync reloads. For an entry already reporting a missing energy site, open Configure > Tesla API connection to select it again. Smart Shift mode control does not provide Tesla's Grid Export setting or Powerwall solar curtailment.
| Connection method | What this route provides |
|---|---|
| Configured Tesla provider | Telemetry and controls through the configured Tesla provider; API permissions and site capabilities still apply. |
| Home Assistant Powerwall integration — monitoring only | Monitoring and planning only; this route does not enable battery dispatch. |
Select one route for PowerSync. A second integration using the same device connection can cause conflicts; the companion-integration route is appropriate when that integration should own communications. See source discovery and switching.
Don't want to run Home Assistant? PowerSync Cloud is a fully hosted alternative ($4.99/month) for Tesla Powerwall users on Amber, GloBird, or Energy Locals. No local server needed — sign in with Tesla, pick your retailer, and PowerSync handles negative-price protection and AEMO spike export automatically. Includes iOS/Android apps and a real-time web dashboard.
PowerSync supports three methods for accessing your Tesla Powerwall via the Home Assistant integration. Choose one — you don't need all three.
The easiest option. PowerSync is a registered Tesla Fleet API partner — when you sign in, Tesla authorizes PowerSync.cc to read your Powerwall data and send commands on your behalf. We never see your Tesla password.
| Pros | |
|---|---|
| Managed energy API connection | Uses the configured PowerSync Tesla provider |
| Browser sign-in | Open the URL shown by the setup form, approve Tesla consent and paste the returned token |
| No Tesla developer account | We're already a registered Fleet API partner |
| No HA integration prerequisite | Works without tesla_fleet installed |
| Region discovery | The provider detects the account region where a supported energy site is available |
Setup:
- In Home Assistant, add the PowerSync integration. When asked which Tesla provider to use, choose PowerSync (recommended).
- Open this URL in any browser: https://api.powersync.cc/auth/start
- Sign in with your Tesla account (Tesla shows a consent screen — approve the energy product scopes)
- You'll get a token starting with
psync_— copy it - Paste it back into the PowerSync setup form
The returned token authorizes this HA energy connection. Keep it private and use the provider/Tesla account security controls to revoke access when needed; deleting an HA entry alone is not proof of remote token revocation. Energy API access and the separate HA optimiser access are different requirements.
If your token gets invalidated for any reason (revoked, expired, etc.), Home Assistant will automatically prompt you to re-authenticate via the same flow.
Uses the Tesla Fleet integration and its configured developer/OAuth access. Check the upstream provider’s current requirements and pricing separately; this connection choice does not determine HA optimiser access.
Setup:
- Install the official Tesla Fleet integration in Home Assistant
- Settings > Devices & Services > Add Integration > "Tesla Fleet"
- Follow the login flow (requires your own Tesla developer app)
- PowerSync automatically detects your Tesla Fleet credentials
- When PowerSync asks which provider to use, select Tesla Fleet API
Third-party paid proxy. Use this if you prefer a managed service or already have a Teslemetry subscription.
Setup:
- Sign up at https://teslemetry.com
- Connect your Tesla account
- Copy your API key
- Choose Teslemetry in the PowerSync setup and paste your API key
When TOU Sync is enabled, PowerSync sends signed import and export rates to Tesla. This includes negative retail rates from Amber, AEMO wholesale, and Flow Power after the selected plan's charges and adjustments. PowerSync Cloud's Tesla TOU Sync uses the same signed rates. The PowerSync price sensors and cost tracking also show the signed rates instead of replacing them with zero.
Tesla accepted and returned negative buy and sell rates in a short test on a configured Powerwall, then the original rate plan was restored. Whether the Powerwall charges or exports in a particular negative-price period still depends on its operational mode, site permissions, backup reserve, and Tesla's own forecast and control decisions. Use Savings (Time-Based Control) if you want Tesla's optimiser to act on the synced tariff, and check the Tesla app and PowerSync tariff sensor after a price update.
Pairing is separate from the Tesla provider choice above. The provider gives PowerSync access to your Tesla energy site; pairing registers a PowerSync RSA key with Tesla so Home Assistant can send signed Powerwall gateway commands and read the richer BMS data used for local control and per-pack battery health.
Pairing is used for:
- Powerwall local control and gateway verification
- Off-grid / reconnect controls
- Off-grid curtailment
- Battery Health and per-pack capacity/SOC/SOH sensors such as
sensor.powerwall_1_capacity - Local gateway snapshots and faster local writes when a gateway IP is configured
Before you start:
- Finish the Tesla Powerwall setup using PowerSync, Tesla Fleet API, or Teslemetry.
- Make sure you can physically reach the Powerwall DC isolator.
- Optional: enter the Powerwall gateway IP during setup, or later in Settings > Battery Setup > Gateway Connection in the PowerSync mobile app. Pairing itself is cloud-based and does not need a gateway IP or customer password. The gateway IP enables LAN-only features such as live local polling, automated curtailment, and fast operation-mode writes.
Pair from the PowerSync mobile app:
- Open the PowerSync app and connect it to your Home Assistant instance.
- Go to Settings > Battery Setup > Local Control.
- Tap Pair Gateway.
- Tap Start Pairing.
- Within the 2-minute pairing window, toggle the Powerwall DC isolator OFF, wait 10 seconds, then toggle it ON again.
- Powerwall 3: the switch is on the left side of the unit, under the cover flap.
- Powerwall 2: the switch is on the right side of the unit.
- Wait for the app to show Paired. Home Assistant should also show
binary_sensor.power_sync_powerwall_local_pairedas on.
Pair from Home Assistant:
- Open the PowerSync integration's entities in Home Assistant.
- Press
button.power_sync_pair_powerwall_gateway. - When the persistent notification asks for the physical-presence check, toggle the DC isolator OFF, wait 10 seconds, then ON again within the 2-minute window.
- Wait for the success notification and confirm
binary_sensor.power_sync_powerwall_local_pairedis on.
Re-pairing and unpairing:
- If the site is already paired, pressing Pair Powerwall Gateway once only arms a 30-second confirmation. Press it again within 30 seconds to generate and register a new key. The old key stays valid until the new key is verified.
- Press
button.power_sync_unpair_powerwall_gatewaytwice within 30 seconds to clear the stored key and return commands to the Tesla cloud path. - If pairing times out, press Pair Gateway again and repeat the DC-isolator toggle.
In v2.12.1411 a token change can continue into older electricity-provider screens. Check the displayed provider before continuing, especially on a non-Amber plan. Do not submit Amber rates for a different retailer. Closing a connection flow does not guarantee earlier connection changes are undone; reopen Electricity pricing & provider to check the saved choice. See current configuration limitations.
After saving connection changes, allow the integration reload to complete. Check fresh battery SOC, grid/solar/battery power and home-load readings for the selected site. Compare signs and totals with the vendor/upstream readings. Planning sensors can update on a monitoring route; that does not establish dispatch capability. Verify any permitted control separately using readback and measured power.
The tables use the current form labels and help text. They list the conditional field union: a field can be hidden for a different battery, provider, route or available integration. The instructions above explain those conditions. Existing saved/discovered values take precedence over fresh fallbacks. Rate units follow the provider; check the displayed currency/energy unit.
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| PowerSync token | Use the value or available choice shown in this form; existing saved/detected values take precedence. | Saved/detected value or the form’s shown fallback |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| Teslemetry API token | Use the value or available choice shown in this form; existing saved/detected values take precedence. | Saved/detected value or the form’s shown fallback |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| Powerwall API provider | Controls how PowerSync reads and writes your Powerwall TOU schedule. PowerSync.cc is free and handles OAuth for you. | Fallback powersync |
| Vehicle API provider | Only needed if you want PowerSync to send commands to a Tesla vehicle (e.g. start/stop charging). Choose None if you only have a Powerwall or use BLE. | Fallback none |
| Force-discharge buy price ($/kWh) | Temporary Tesla import price during force discharge. Defaults to $0.55/kWh; this is a control signal, not your retail tariff. | Fallback 0.55; 0–99; step 0.01 |
| Force-discharge sell price ($/kWh) | Temporary Tesla export price during force discharge. Defaults to $25.00/kWh and must exceed the buy price; this is a control signal, not your feed-in tariff. | Fallback 25.0; 0.01–99; step 0.01 |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| API token | Get a token from teslemetry.com. Paste the full token string. | Saved/detected value or the form’s shown fallback |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| PowerSync token | Open the authorization URL displayed by the setup form in a browser, sign in with Tesla, and copy the psync_ token. Your Tesla credentials are never shared with PowerSync. | Saved/detected value or the form’s shown fallback |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| Tesla energy site | The Powerwall or Solar site that PowerSync will control. If you have multiple Tesla sites, choose the one at this address. | Saved/detected value or the form’s shown fallback |
| Powerwall gateway IP address | Optional. Provides direct LAN access for live local polling and fast gateway writes — pairing handles authentication via RSA signing, no password required. | Fallback blank (see retention/clear rules) |
| Sync TOU schedule automatically | When enabled, PowerSync uploads a new TOU tariff schedule to your battery every 5 minutes based on current Amber prices. | Fallback On |
| Amber price forecast | Predicted is balanced. Low assumes cheaper prices (more aggressive charging). High assumes expensive prices (more conservative). | Fallback predicted |
| Enable battery export curtailment | Stop battery export when earnings fall below the configured threshold (negative earnings by default). This controls the battery/Tesla path only; supported DC solar curtailment has its own opt-in. | Fallback Off |
| Amber site | If you have multiple Amber NMIs, select the one associated with this Powerwall. | Saved/detected value or the form’s shown fallback |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| Powerwall API provider | Controls how PowerSync reads and writes your Powerwall TOU schedule. PowerSync.cc is free and handles OAuth for you. | Saved/detected value or the form’s shown fallback |
| Vehicle API provider | Only needed if you want PowerSync to send commands to a Tesla vehicle (e.g. start/stop charging). Choose None if you only have a Powerwall or use BLE. | Saved/detected value or the form’s shown fallback |
| Powerwall gateway IP address | Optional. Provides direct LAN access for live local polling and fast gateway writes — pairing handles authentication via RSA signing, no password required. | Saved/detected value or the form’s shown fallback |
| Force-discharge buy price ($/kWh) | Temporary Tesla import price during force discharge. Defaults to $0.55/kWh; this is a control signal, not your retail tariff. | 0–99; step 0.01 |
| Force-discharge sell price ($/kWh) | Temporary Tesla export price during force discharge. Defaults to $25.00/kWh and must exceed the buy price; this is a control signal, not your feed-in tariff. | 0.01–99; step 0.01 |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| Electricity provider | Use the value or available choice shown in this form; existing saved/detected values take precedence. | Saved/detected value or the form’s shown fallback |
| Tesla Energy API provider | Use the value or available choice shown in this form; existing saved/detected values take precedence. | Saved/detected value or the form’s shown fallback |
| Tesla EV API provider | Use the value or available choice shown in this form; existing saved/detected values take precedence. | Saved/detected value or the form’s shown fallback |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| PowerSync token | Open the authorization URL displayed by the setup form in a browser, sign in with Tesla, and copy the psync_ token. Your Tesla credentials are never shared with PowerSync. | Fallback blank (see retention/clear rules) |
| Field | Meaning / input | Fallback / limits |
|---|---|---|
| API token | Get a token from teslemetry.com. Paste the full token string. | Fallback blank (see retention/clear rules) |