Metadata-Version: 2.5
Name: aiosolaredge-one
Version: 0.3.0
Summary: Async client for the SolarEdge ONE (Monitoring v2) API
Project-URL: Homepage, https://github.com/CathalOConnorRH/solaredge-v2
Project-URL: Repository, https://github.com/CathalOConnorRH/solaredge-v2
Project-URL: Issues, https://github.com/CathalOConnorRH/solaredge-v2/issues
Project-URL: Changelog, https://github.com/CathalOConnorRH/solaredge-v2/blob/main/CHANGELOG.md
Author: aiosolaredge-one contributors
License: MIT License
        
        Copyright (c) 2026 aiosolaredge-one contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: async,home-assistant,monitoring,solar,solaredge
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AsyncIO
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: aiohttp>=3.9
Provides-Extra: dev
Requires-Dist: mypy>=1.8; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: publish
Requires-Dist: build>=1.2; extra == 'publish'
Requires-Dist: twine>=5.0; extra == 'publish'
Description-Content-Type: text/markdown

# aiosolaredge-one

Async Python client for the **SolarEdge ONE** (Monitoring API v2) platform. It
powers the
[SolarEdge ONE Home Assistant integration](https://github.com/CathalOConnorRH/ha-solaredge-one),
which lives in its own repo and depends on this package.

Base URL: `https://monitoringapi.solaredge.com/v2` · Auth: `X-API-Key` header
(plus optional `X-Account-Key` for Fleet accounts).

> Status: **alpha**. Endpoint coverage and models are derived from Phase 0 live
> captures. Some query-param names and the storage/battery/environmental paths
> are still unconfirmed pending docs.

## Install (dev)

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
```

## Usage

```python
import aiohttp
from aiosolaredge_one import SolarEdgeOneClient

async with aiohttp.ClientSession() as session:
    client = SolarEdgeOneClient(session, api_key="...")
    sites = await client.get_sites()
    overview = await client.get_site_overview(sites[0].site_id)
    print(overview.production.total, overview.production.unit)
    power = await client.get_power(sites[0].site_id)
    print("current power:", power.latest_value, power.unit)
```

## What it covers (Phase 0-confirmed endpoints)

| Method | Endpoint |
|--------|----------|
| `get_sites()` | `GET /sites` |
| `get_site_overview(id)` | `GET /sites/{id}/overview` |
| `get_devices(id)` | `GET /sites/{id}/devices` |
| `get_energy(id, ...)` | `GET /sites/{id}/energy` |
| `get_power(id, ...)` | `GET /sites/{id}/power` |
| `get_alerts(id)` | `GET /sites/{id}/alerts` |

Rate limiting: the client exposes `client.rate_limit` (per-minute limit +
remaining, parsed from response headers) and an optional `CreditLedger` for
tracking the monthly quota locally (not exposed by the API).
