Skip to content

Releases: azogue/aiopvpc

Split today / tomorrow price sensor attributes (2021-11-20)

20 Nov 12:37
Compare
Choose a tag to compare

Changes:

  • Generate different sets of sensor attributes for hourly prices for current day and for the next day (available at evening), so attrs like price_position or price_ratio don't change for the current day when next-day prices are received (#32)
  • Fix zoneinfo import for python3.8 (#33)

Migrate CI from travis to gh-actions

04 Nov 11:36
Compare
Choose a tag to compare

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
  • 🔥 Remove old travis CI config

Quickfix for 403 status code from ESIOS API

03 Nov 20:26
Compare
Choose a tag to compare

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

12 Jun 18:13
Compare
Choose a tag to compare

Changes:

  • Determine tariff period (P1/P2/P3) for current hour, and calculate the delta hours to the next one, publishing attributes period, next_period, and hours_to_next_period
  • Add price_ratio (value in [0,1] interval showing ~percentile position of current price), max_price, and max_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, and num_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

01 Jun 06:43
Compare
Choose a tag to compare

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

23 May 10:22
Compare
Choose a tag to compare

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

16 May 10:49
Compare
Choose a tag to compare

Changes:

  • Remove pytz dependency and handle timezones with zoneinfo (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 of pytest-aiohttp, add mypy to pre-commit, and a general dependency update (from unreleased v2.0.3 in #13, triggered by #11)

Unpinned requirements for HA

04 Aug 08:35
Compare
Choose a tag to compare
  • Fix outdated pinned requirements by setting just a minimal version, and syncing those with HomeAssistant

Add methods to download a range of days

07 May 15:50
Compare
Choose a tag to compare

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 a concurrency_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-specific Dict[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

07 May 11:40
af210be
Compare
Choose a tag to compare
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