You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom_components/solaredgeoptimizers/solaredge_one_api.py
+25-8Lines changed: 25 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
"""
2
-
SolarEdge One API clientfor Home Assistant integration.
2
+
SolarEdge One portal API client: OAuth authentication and services/layout endpoints for site structure, optimizer live data, temperatures, and lifetime energy.
3
3
4
-
This client is used by the dual API (api_dual.py) when Use SolarEdge One is enabled.
5
-
Uses the SolarEdge One portal endpoints (monitoring.solaredge.com/services/...):
4
+
Used by api_dual when Use SolarEdge One is enabled. Endpoints (monitoring.solaredge.com/services/...):
6
5
7
6
- **Site structure**: GET .../layout/logical/generic/v2/site/{siteId}?include-optimizers=true
8
7
- **Optimizer info + live data**: POST .../layout/information/optimizers (body: list of serials).
@@ -12,7 +11,7 @@
12
11
- **Inverter information**: GET .../layout/information/inverters?inverter-serials=...
13
12
Returns fullModel (e.g. SE5000H-RW000BNN4). 403 Forbidden is non-fatal; devices still work with position-based identity.
14
13
- **Optimizer temperatures**: GET .../layout/energy/site/{siteId}/by-inverter?start-date=...&end-date=...&inverter-serials=...&include-max-temperature=true.
15
-
Returns per-optimizer temperature (°C). Cached 15 min; merged into optimizer data.
14
+
Returns per-optimizer temperature (may be °C or °F per temperatureUnit). Cached 15 min; merged into optimizer data (normalized to °C).
16
15
- **Lifetime energy**: GET .../layout/energy-graph/site/{siteId}/optimizers?optimizer-serials=...&start-date=...&end-date=...
17
16
One request per optimizer; when cache is cold, requests run in parallel (thread pool); cached 1 h.
0 commit comments