Metadata-Version: 2.4
Name: EstymaApiWrapper
Version: 0.0.71
Summary: Wrapper for the EstymaApi
Home-page: https://github.com/Tabisch/EstymaApi
Author: Tabisch
Author-email: tobithieman@gmail.com
Project-URL: Bug Tracker, https://github.com/Tabisch/EstymaApi/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp
Requires-Dist: beautifulsoup4
Dynamic: license-file

Wrapper for the Estyma Heating Systems. \
Igneo.pl and bia24.net are both work.

The wrapper ist primarily build to integrate our heating system into home assistant.

https://github.com/Tabisch/Igneo_ha_integration


## Statistics

Download the statistics (line chart) data of a device:

```python
import datetime

stats = await api.getStatistics(deviceID)                                  # today
stats = await api.getStatistics(deviceID, dateTo=datetime.date(2026, 11, 18))  # a specific day
stats = await api.getStatistics(deviceID, dateFrom="01-11-2026", dateTo="19-11-2026")

stats["temp_boiler_sub1"]["data"]  # [{"timestamp": <epoch seconds>, "value": 69.3}, ...]
```

Each series is keyed by its translated id and contains `name`, `unit`, `visible`, `from`, `to` and `data`.
Pass `translateData=False` to keep the original api ids, or `raw=True` to get the unmodified api response.

Download the fuel consumption of a device for one month (defaults to the current month):

```python
fuel = await api.getFuelStatistics(deviceID, year=2026, month=1)

fuel["data"]        # [{"day": 1, "fuel": 41, "price": 0.9, "cost": 36.9, "currency": "PLN"}, ...]
fuel["fuel_total"]  # summed fuel of the month
fuel["cost_total"]  # 1320.3

yearly = await api.getFuelStatistics(deviceID, year=2026, month=0)  # whole year, one entry per month
```

Check which statistics a device provides (read from its chart page, cached for an hour):

```python
limits = await api.getStatisticsLimits(deviceID)

limits["statistics"]      # {"dateFrom_min": date, "dateTo_min": date, "dateTo_max": date, "maxRangeDays": 7, "accuracy": {...}, ...}
limits["fuelStatistics"]  # {"years": [2022, ..., 2026], "months": {0: "whole year", 1: "January", ...}}
```

`getStatistics` and `getFuelStatistics` check the request against these limits and raise `StatisticsNotAvailable` when it is outside of them. Pass `validate=False` to skip the check.
