Releases: azogue/aiopvpc
Releases · azogue/aiopvpc
Split today / tomorrow price sensor attributes (2021-11-20)
Migrate CI from travis to gh-actions
v2.2.2 - Migrate CI from travis to gh-actions (2021-11-04)
Internal maintenance version (details in #29)
Changes:
- 🎨 Add isort to pre-commit config
- 💚 Add configuration for pre-commit.ci to run linter checks there
- 💚 CI flow with GitHub Actions to
- install library with
poetry
- run tests
- upload coverage when merging to master
- publish a new pypi version when merging to master if
pyproject.toml
changes
- install library with
- 🔥 Remove old travis CI config
Quickfix for 403 status code from ESIOS API
Changes:
- Fix Esios request returning a 403 status code since 2021-11-02, by adding an 'User-Agent' to the request headers (details in #28); and add more error logging for this 'forbidden' error to catch it if it reappears in the future
- Update deps, requiring holidays>0.11.1
Add new sensor attributes for new tariff 2.0TD
Changes:
- Determine tariff period (P1/P2/P3) for current hour, and calculate the delta hours to the next one, publishing attributes
period
,next_period
, andhours_to_next_period
- Add
price_ratio
(value in [0,1] interval showing ~percentile position of current price),max_price
, andmax_price_at
attributes - Add
price_position
attribute (1 for cheaper price, 24 for the most high-priced), as suggested by @r-jordan in #23 - When there are cheaper prices ahead, add attributes
next_better_price
,hours_to_better_price
, andnum_better_prices_ahead
- Add contracted power in kW as new parameters (power for P1/P2 and power for P3) to show the
available_power
for each period - Use
holidays
library to retrieve national holidays where to apply the valley period P3 for the full day
Quick adaptation to new unique price tariff 2.0TD
Changes:
- Prices for dates >= 2021-06-01 (new '2.0 TD' tariff) now use "PCB" and "CYM" price identifier keys instead of the old keys for previous price tariffs (GEN/NOC/VHS), matching the new JSON from Esios API, and making the HA sensor work again.
- Add new flag to set prices for Ceuta & Melilla (to use "CYM" identifier instead of "PCB")
Note: this is a quickfix (a patch!) to make the sensor work again for the new tariff. No "new features" are introduced, like 'period' indicators for energy or power; these will come in future releases :)
Fix HA state and attributes after v2.1.0
Changes
- Fix a bug introduced in v2.1.0 related to the "state" and "attributes" for the PVPC sensor in Home Assistant
Fix prices badly assigned outside default timezone
Changes:
- Remove
pytz
dependency and handle timezones withzoneinfo
(related to this article in HA developers blog),
and adapt to use input timezone as a time zone object or a string identifier. - Fix prices being badly assigned in Canary Islands timezone.
Before, prices where assumed absolute in time, and marked with tz-aware UTC datetimes,
but that behavior was incorrect 😔, as prices are applicable by-hour, independently of the timezone.
So now the produced prices are shifted, to apply the correct ones for each local hour, so given the price at 10AM, it will be the same across all timezones.
THIS IS A BREAKING CHANGE over the old behavior, if you live in the Canary Islands (because before the prices were incorrect!) - Fix sensor attributes in month changes (there were badly tagged as "price last day" instead of "price next day" 🤪).
- Update tests suite to use
pytest-asyncio
instead ofpytest-aiohttp
, addmypy
to pre-commit, and a general dependency update (from unreleased v2.0.3 in #13, triggered by #11)
Unpinned requirements for HA
- Fix outdated pinned requirements by setting just a minimal version, and syncing those with HomeAssistant
Add methods to download a range of days
Implemented enhancements:
- Async & blocking methods to download prices for a range of days
- Use an
asyncio.Queue
to control concurrency for downloading a bunch of days, by creating aconcurrency_calls
number of workers - Make specific tariff optional, to get ALL PVPC detailed data when None, with schema
Dict[datetime, Dict[str, float]
instead of tariff-specificDict[datetime, float]
Changes:
- Make all parameters optional, to easier instantiation with
PVPCData()
- Add minimal doc in README and an example of use for bulk download of PVPC prices
Initial version for HA 'pvpc_hourly_pricing' integration
Fix timezone support outside reference zone (#1) * Fix timezone support outside reference zone * Bump version to 1.0.2 * Add coverage badge * Add deploy stage to CI