> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://teslemetry.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Solar Charging Automation

Solar charging automation allows you to charge your Tesla using excess solar production from your home solar system. This guide covers how to set up solar charging automation with Teslemetry and Home Assistant, including cost-effective alternatives for frequent charge rate adjustments.

## Understanding Solar Charging Costs

### Why is Solar Charging Expensive Through the Fleet API?

Solar charging automation typically requires frequent adjustments to your vehicle's charge rate to match available solar power. This can mean sending dozens to hundreds of commands per day as solar production fluctuates. Since Tesla charges for every Fleet API command, and Teslemetry passes these costs through via command credits, solar charging can quickly consume your credits.

**Example scenario:**
* Adjusting charge amps every 5 minutes for 8 hours of daylight
* 96 commands per day x 1 credit each = 96 credits
* Plus wake commands if the vehicle sleeps between adjustments

---

## Frequently Asked Questions

### Can I use Teslemetry for excess solar charging?

**Yes**, but with important cost considerations. For occasional adjustments, this works well. For continuous real-time optimization, the command credits can add up quickly. Consider using Bluetooth alternatives for the actual charge control while using Teslemetry for monitoring and data.

### How do I set up charging on solar automation in Home Assistant?

**Option 1: Using Teslemetry (Cloud-based)**

This approach uses the Fleet API and consumes command credits for each command.

**Option 2: Using Bluetooth (Free, Local)**

For frequent charge rate adjustments without command costs, use one of these Bluetooth options:

* **Teslemetry HACS beta with BLE** - the beta version of the Teslemetry integration adds BLE-first command routing
* **ESPHome Tesla BLE** - [github.com/yoziru/esphome-tesla-ble](https://github.com/yoziru/esphome-tesla-ble)

These allow local control of charging without consuming command credits.

### What Bluetooth alternatives are available for solar charging?

#### Teslemetry HACS Beta (BLE-first commands)

The beta (HACS) version of the Teslemetry Home Assistant integration routes commands **BLE-first with automatic cloud fallback**: commands go over Bluetooth when the vehicle is in range and fall back to the Fleet API when it is not.

**Key properties:**
* Works with Home Assistant Bluetooth proxies for extended range
* **Coexists with the core Teslemetry integration** - no need to choose one or the other
* One-time vehicle pairing, then commands route automatically
* Requires Home Assistant 2026.7 or later

#### ESPHome Tesla BLE

Created by Yasir Ekinci, [esphome-tesla-ble](https://github.com/yoziru/esphome-tesla-ble) enables ESP32 microcontrollers running ESPHome to connect to your Tesla over Bluetooth Low Energy.

**Supported charging commands:**
* Turn charging on/off
* Set charging amps
* Set charge limit percentage

**Requirements:**
* ESP32 device (tested with M5Stack NanoC6)
* Python 3.10+
* ESPHome experience

### How do I know when charging is complete vs manually stopped?

The Teslemetry charging sensor provides different states:

| State | Meaning |
| ---- |
| `completed` | Charging finished because the state of charge limit was reached |
| `stopped` | Charging was manually stopped before reaching the SOC limit |
| `charging` | Vehicle is actively charging |
| `disconnected` | No charging cable connected |

---

## Tips for Reducing Command Credit Usage

1. **Use Bluetooth for frequent commands** - the Teslemetry HACS beta's BLE routing or ESPHome Tesla BLE for charge amp adjustments
2. **Add delays between commands** - Every 5-10 minutes may be sufficient
3. **Set minimum change thresholds** - Only send a command if the change is significant (e.g., 2+ amps difference)
4. **Use Teslemetry for monitoring** - Streaming telemetry is included in your subscription without per-command costs
5. **Check vehicle state before commanding** - Avoid sending commands if the vehicle is asleep (wake costs 20 credits)

---

## Related Resources

* [Teslemetry Bluetooth Control Documentation](https://teslemetry.com/docs/topics/bluetooth)
* [ESPHome Tesla BLE](https://github.com/yoziru/esphome-tesla-ble)
* [Home Assistant Actions Documentation](https://teslemetry.com/docs/home-assistant/actions)