Send your PV system data (grid power, solar production, battery status) to the clever-PV Push API and receive control commands for your battery as needed.
Features
- Push data to us (grid power, solar production, battery status)
- Optional battery control: Receive charge/discharge instructions from us
- Supports grid power, solar production, battery SOC, and charging power
- Configurable push interval (10-300 seconds, default: 30)
- Various sensors for monitoring push status and battery control state
Installation
Marketplace (Recommended)
You need Home Assistant 2026.11 or newer. The Marketplace is included in Home Assistant, so you don't need to install it.
Shortcut: Open this link: Add clever-PV to the Marketplace. Home Assistant opens. Confirm adding the repository there and continue with step 5.
- In Home Assistant, go to Settings โ Marketplace. The first time you open it, the Marketplace shows a notice. Read it and accept it.
- Click โAdd from linkโ in the top right corner.
- Under โGitHub linkโ, enter:
https://github.com/clever-PV/home-assistant-clever-PV - Click โAddโ. If your GitHub account is not connected yet, you will be asked to connect it now.
- Open clever-PV in the list and click โInstallโ. Confirm with โInstallโ in the dialog.
- The integration setup then opens. Continue below with Configuration in Home Assistant. If Home Assistant asks for a restart, restart it.
Manual Installation
- Copy the
custom_components/cleverpvfolder to theconfig/custom_components/directory of your Home Assistant - Restart Home Assistant
Configuration in Home Assistant
- Go to Settings > Devices & Services
- Click Add Integration
- Search for "clever-PV"
- Enter your push URL
- Select the entities to be transmitted:
- Grid Power (required): Sensor displaying grid power in watts (positive = import, negative = export)
- Solar Production (optional): Sensor displaying current solar production in watts
- Battery SOC (optional): Sensor displaying the battery state of charge in percent
- Battery Power (optional): Sensor displaying the battery charge/discharge power in watts
- Configure optional features:
- Enable battery control (optional): If enabled, we can send control commands back to Home Assistant
Entities
The integration creates the following diagnostic sensors:
| Sensor | Description |
|---|---|
| Push Status | Success or error status of the last push operation |
| Last Push | Timestamp of the last successful push operation |
| Last Response | Response message from the clever-PV API |
| Last Payload | JSON data (payload) of the last push operation |
| Push Count | Total number of successful push operations |
If battery control is enabled, additional sensors are created:
| Sensor | Description |
|---|---|
| Battery Control State | Current command from us: Normal, Idle, Force Charge, Force Discharge, or Limit Charge Power |
| Battery Force Power | Target power in watts (only set during Force Charge/Discharge) |
Data Format
The integration sends the following data to us:
| Field | Description |
|---|---|
watt |
Grid power (positive = import, negative = export) |
producingWatt |
Solar production in watts |
soc |
Battery state of charge (0-100%) |
chargingPower |
Battery power in watts |
powerStorageState |
0=Standby, 1=Charging, 2=Disabled, 3=Discharging |
batteryControlEnabled |
If "true", control commands are requested |
Battery Control
If battery control is enabled, we can send commands to optimize your battery based on electricity prices and solar forecasts. These commands are held in two sensors:
-
Battery Control State: Normal, Idle (pause), Force Charge, Force Discharge, or Limit Charge Power -
Battery Force Power: Desired power for the battery (except in Normal or Idle mode)
Requirements
- An account with Smart Battery Price Control enabled
- A configured dynamic tariff
How it works
- The integration sends
batteryControlEnabled: truewith every push - We respond with control commands (if available)
- The commands appear as sensor values in Home Assistant
Control States
| State | Description |
|---|---|
| Normal | Self-consumption mode (default behavior) |
| Idle | Pause charging and discharging |
| Force Charge | Charge battery at specified power |
| Force Discharge | Discharge battery at specified power |
| Limit Charge Power | Self-consumption with limited charging power |
Using the Sensors
You can use the battery control sensors in Home Assistant automations to control your inverter. For example, create an automation that reads the Battery Control State sensor and sends the corresponding command to your inverter.
Reconfiguration
To change settings after the initial setup:
- Go to Settings > Devices & Services
- Find the clever-PV integration
- Click Configure
- Update the push URL or entity selection
Troubleshooting
Enable debug logging by adding the following lines to your configuration.yaml:
logger:
default: info
logs:
custom_components.cleverpv: debug