Simple aio library to download Spanish electricity hourly prices (PVPC) from esios.ree.es

PyPI Version pre-commit.ci Status Build Status Code Coverage

aiopvpc

Simple aio library to download Spanish electricity hourly prices.

Made to support the pvpc_hourly_pricing HomeAssistant integration.

Buy Me A Coffee donate button

Install

Install with pip install aiopvpc or clone it to run tests or anything else.

Usage

from datetime import datetime
from aiopvpc import PVPCData

pvpc_handler = PVPCData(tariff="discrimination", zone_ceuta_melilla=False)

start = datetime(2021, 5, 20, 22)
end = datetime(2021, 6, 7, 16)
prices_range: dict = await pvpc_handler.async_download_prices_for_range(start, end)

Check this example on a jupyter notebook, where the downloader is combined with pandas and matplotlib to plot the electricity prices. To play with it, clone the repo and install the project with poetry install -E jupyter, and then poetry run jupyter notebook.

sample_pvpc_plot.png

Owner
Eugenio Panadero
Industrial engineer who was seduced by the Binary Side and ended up as software project manager. Around here with IoT and home automation stuff, mainly
Eugenio Panadero
Comments
  • No funciona la integración con HA desde el 2 de noviembre

    No funciona la integración con HA desde el 2 de noviembre

    Hola, la integración con Homeassistant ha dejado de funcionar (estado unavailable) cuando he realizado una actualización de versión del core y se ha reiniciado HA. He vuelto a configurar la integración por si era algún problema con mi instalación y sigue sin funcionar. Incluso he vuelto a la versión anterior de HA y tampoco se soluciona. ¿Puede ser algún problema con el reciente cambio de hora del día 1 de noviembre? Se agradece una rápida respuesta. Saludos!

  • Nueva tarifa a partir del 1 de junio

    Nueva tarifa a partir del 1 de junio

    Hola @azogue !

    Te escribo en castellano que nos entendemos mejor 😉

    Te quería preguntar sobre el cambio de tarifas que nos viene el primer día de junio. Habrá una sola tarifa con discriminación horaria en vez de tres. ¿La librería se comportará bien? Supongo que si no se ha podido probar será difícil saberlo. Bueno, estaremos pendientes. Sí necesitas ayuda en algo me ofrezco voluntario.

    Saludos!

  • 🤟 Fix user-agent banning by ESIOS server

    🤟 Fix user-agent banning by ESIOS server

    closes #34

    related to https://github.com/home-assistant/core/issues/60556

    Quick-Fix motivated by the last change in the ESIOS server (on 2021-11-30 😱), which is now apparently banning HomeAssistant requests, filtering us out because of the 'User-Agent' headers data 😤, as the server is returning a 403 status code error for a PUBLIC url 🤷.

    So, until future moves to authenticated endpoints, or alternative data sources, let's continue playing 🐈 and 🐁 with the ESIOS webadmins 🤣🤣

    [Serious note for those webadmins]: I'm just a volunteer, and I'm an email away for contact, so please, if you are reading this, give me a call before filtering us all out 🤝🥺

    Changes:

    • :zap: Substantially decrease the number of API requests to ESIOS, avoiding unnecessary calls to refresh data for the same electricity prices. Before, when used from the pvpc_hourly_pricing HA Core integration, the ESIOS API was called 2 times/hour from 0h to 20h, and 4 times/hour in the evening, from 20h to 0h, retrieving today + tomorrow prices. This makes a total of ~56 requests/day, which is not a lot 😅, but it seems the aggregated total for the HA user base (🔥 >30k requests/day just counting users pushing HA analytics) is being some kind of a problem for ESIOS, as it looks like they're trying to bane us 🥺😭 Now, the API handler avoids calls to retrieve already available prices, cutting down the number of requests to just 1-2 requests/day 🤩

    • :bug: Set standard User-Agent header info, to try to avoid server-side banning 🙈, and rotate it if banning is detected, using common User-Agent browser identifiers.

    • :recycle: Minor code refactor to prepare for future library changes, in order to move to authenticated API endpoints in future versions.

  • sensor.pvpc: repeated bad data update, mark component as unavailable source

    sensor.pvpc: repeated bad data update, mark component as unavailable source

    Home Assistant shows the following error in the pvpc_hourly_pricing integration:

    Logger: aiopvpc.pvpc_data Source: /usr/local/lib/python3.9/site-packages/aiopvpc/pvpc_data.py:231 ... Forbidden error with 'https://api.esios.ree.es/archives/70/download_json?locale=es&date=2021-11-29' -> Headers: ...

    It seems the same happened before: https://github.com/azogue/aiopvpc/issues/31

  • Atributo para obtener el precio actual

    Atributo para obtener el precio actual

    Hola! Estoy intentando crear una automatización en HA de forma que pueda utilizar el precio actual como condicionante para disparar acciones.

    Por ejemplo, que cuando el precio sea >0.15, apague un interruptor, y que cuando el valor sea inferior, vuelva a encenderlo.

    Para ello tendría que poder "leer" el "precio actual" como un atributo, pero ahora mismo tendría que crear una condición por cada uno de los atributos "Price 00h", "Price 01h"... etc. para que la automatización pueda leer las variaciones de precio, lo cual es bastante tedioso.

    Sería posible leer el precio actual de un único atributo, de forma que solo sea necesario crear un condicionante de estado numérico?

    Un saludo y gran trabajo. Gracias de antemano.

  • Question about when price_next_day or price_last_day attributes are generated

    Question about when price_next_day or price_last_day attributes are generated

    Hi Eugenio.

    Great project! I'm using it from the Homeassistant integration and it works flawlessly. But I have a question about the price_next_day and price_last_day attributes.

    I understand the price_next_day attributes because they contain the price for the next day. They usually appear at the state change of 21:00 because they are retrieved between 20:00 a 21:00. But some days the attributes generated are price_last_day. What do price_last_day attributes mean? I have some template sensors that read these attributes and I want to understand what they mean in order to program them in that cases.

    Muchas gracias y saludos!

  • Evolve sensor attributes for new tariff 2.0TD

    Evolve sensor attributes for new tariff 2.0TD

    cc @pove

    closes #19

    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
  • Sensor unavailable desde 02/11 (con actualización)

    Sensor unavailable desde 02/11 (con actualización)

    Buenas!!

    Necesito un cable, porque continuo teniendo problemas con la integración.

    Tengo actualizado el core a la versión core-2021.11.1core-2021.11.2 He descargado el custom component pvpc_hourly_pricing.zip He desinstalado e instalado varias veces la integración He revertido la versión del core-2021.11.1 a la anterior core-2021.10.7 y vuelto a reinstalar

    Y sigue sin funcionar. Este es el log de mi último arranque.

    2021-11-09 08:27:50 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration pvpc_hourly_pricing which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2021-11-09 08:31:07 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform pvpc_hourly_pricing is taking over 10 seconds. 2021-11-09 08:31:51 ERROR (MainThread) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2020-11-09 08:31:08.063687 to 2021-11-09 23:59:59.000059 in 43.12 sec 2021-11-09 08:32:10 WARNING (MainThread) [custom_components.pvpc_hourly_pricing.sensor] sensor.pvpc: repeated bad data update, mark component as unavailable source 2021-11-09 08:32:34 ERROR (MainThread) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2020-11-09 08:32:07.855658 to 2021-11-09 23:59:59.000059 in 26.84 sec 2021-11-09 08:32:55 ERROR (MainThread) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2021-10-01 00:00:00 to 2021-11-09 23:59:59.000059 in 8.45 sec 2021-11-09 08:33:22 ERROR (MainThread) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2021-10-01 00:00:00 to 2021-11-09 23:59:59.000059 in 7.63 sec 2021-11-09 08:33:42 ERROR (SyncWorker_14) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2021-03-28 01:00:00 to 2021-03-28 03:00:00 in 3.13 sec 2021-11-09 08:33:48 ERROR (SyncWorker_14) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2021-11-02 11:00:00 to 2021-11-09 08:32:34.885720 in 5.02 sec 2021-11-09 08:33:51 ERROR (MainThread) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2021-10-01 00:00:00 to 2021-11-09 23:59:59.000059 in 7.28 sec 2021-11-09 08:34:20 ERROR (MainThread) [aiopvpc.pvpc_data] BAD Download of PVPC prices from 2021-10-01 00:00:00 to 2021-11-09 23:59:59.000059 in 6.05 sec

    Saludos!

  • Setting development environment

    Setting development environment

    Hi @azogue ,

    I'm trying to setup a development environment for this library because I would like to add some new calculated attributes. What python version do I need to install? Some other recommendations? My operating system is Linux.

    Regards, Raúl

  • Add cheaper_hours attribute

    Add cheaper_hours attribute

    Hi @azogue !

    My first pull request in aiopvpc :tada: I'm becoming a developer at great speed!

    This pull request creates the new attribute that calculates the number of hours cheaper than the current one in the current 24 hours period. I've added a condition to compare against the last 27 hours when the prices of the next day are available (since 21h until 23 of the next day). I hope you like it!

    I've tested with my simple python script and it works:

    $ python test.py 
    0.10874
    {'attribution': 'Data retrieved from api.esios.ree.es by REE', 'tariff': '2.0TD', 'period': 'P3', 'available_power': 3300.0, 'next_period': 'P2', 'hours_to_next_period': 56.0, 'price_ratio': 0.62, 'max_price': 0.11933, 'max_price_at': 22, 'min_price': 0.09121, 'min_price_at': 16, 'next_best_at': [16, 15, 17, 11, 12, 10, 14, 18, 13, 7, 6, 5, 9, 8, 4, 19, 2, 3, 1, 0, 20, 23, 21, 22], 'price_00h': 0.10874, 'price_01h': 0.10771, 'price_02h': 0.10682, 'price_03h': 0.1074, 'price_04h': 0.10476, 'price_05h': 0.10076, 'price_06h': 0.10073, 'price_07h': 0.10015, 'price_08h': 0.10432, 'price_09h': 0.10089, 'price_10h': 0.09604, 'price_11h': 0.09295, 'price_12h': 0.0936, 'price_13h': 0.09965, 'price_14h': 0.09623, 'price_15h': 0.09139, 'price_16h': 0.09121, 'price_17h': 0.09153, 'price_18h': 0.097, 'price_19h': 0.10544, 'price_20h': 0.11377, 'price_21h': 0.11817, 'price_22h': 0.11933, 'price_23h': 0.11685, 'cheaper_hours': 19}
    

    Please, review it and consider integrate in the next version with the new advanced attributes :wink:

    Thank you much, Raúl

  • Despues del cambio de tarifas del 1/junio no funciona

    Despues del cambio de tarifas del 1/junio no funciona

    Buenos dias,

    Despues del cambio de tarifas de hoy no funciona correctamente el componente, He actualizado el componente a la ultiam version 2.1.2, pero no sé como configurarlo para que funcione correctamente. La instalación la hice desde "añadir integración" de HA, no lo tengo como custom component.

    Podrías indicarme como solucionarlo por favor?

    Muchas gracias de antemano!

  • Add gas compensation cost

    Add gas compensation cost

    Could the cost of gas compensation be added? Some marketers are thinking of adding it to the price of the injection and it would be interesting to have both data in order to obtain the total price of the injection.

  • Test failures with holidays-0.13

    Test failures with holidays-0.13

    With with holidays-0.13 there are three failures. 0.13 contains some changes for Spain.

    https://github.com/dr-prodigy/python-holidays/pull/634 contains a change around the Spanish holidays but it doesn't help to get the aiopvpc tests to pass.

    ============================= test session starts ==============================
    platform linux -- Python 3.10.2, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /nix/store/c6dwl65z7z9vyadfzp5aqbfv6bi1afnz-python3-3.10.2/bin/python3.10
    cachedir: .pytest_cache
    rootdir: /build/source, configfile: pyproject.toml, testpaths: tests
    plugins: asyncio-0.17.2, timeout-2.0.2
    asyncio: mode=legacy
    collected 46 items / 4 deselected / 42 selected  
    [...]
    =================================== FAILURES ===================================
    _________________ test_number_of_national_holidays[2021-104-7] _________________
    
    year = 2021, days_weekend_p3 = 104, extra_days_p3 = 7
    
        @pytest.mark.parametrize(
            "year, days_weekend_p3, extra_days_p3",
            (
                (2021, 104, 7),
                (2022, 105, 7),
                (2023, 105, 9),
            ),
        )
        def test_number_of_national_holidays(year, days_weekend_p3, extra_days_p3):
            """Calculate days with full P3 valley period."""
            holidays_p3 = weekend_days_p3 = 0
            day = datetime(year, 1, 1, 15, tzinfo=REFERENCE_TZ)
            while day.year == year:
                period, _, _ = get_current_and_next_tariff_periods(day, False)
                if period == "P3":
                    if day.isoweekday() > 5:
                        weekend_days_p3 += 1
                    else:
                        holidays_p3 += 1
                day += timedelta(days=1)
            assert weekend_days_p3 == days_weekend_p3
    >       assert holidays_p3 == extra_days_p3
    E       assert 8 == 7
    E         +8
    E         -7
    
    tests/test_tariff_attributes.py:34: AssertionError
    [...]
        warnings.warn(
    
    -- Docs: https://docs.pytest.org/en/stable/warnings.html
    =========================== short test summary info ============================
    FAILED tests/test_tariff_attributes.py::test_number_of_national_holidays[2021-104-7]
    FAILED tests/test_tariff_attributes.py::test_number_of_national_holidays[2022-105-7]
    FAILED tests/test_tariff_attributes.py::test_number_of_national_holidays[2023-105-9]
    =========== 3 failed, 39 passed, 4 deselected, 2 warnings in 19.93s ============
    

    Could you please take a look? I guess that you are more familiar with Spanish holidays than I am. Thanks.

  • Detected code that uses str for device registry entry_type

    Detected code that uses str for device registry entry_type

    I think this error is produced by your integration. I see just three errors before loading each of the three sensors:

    2022-01-10 10:37:58 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that uses str for device registry entry_type. This is deprecated and will stop working in Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue.
    Stack (most recent call last):
    File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module>
    sys.exit(main())
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
    File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
    File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity
    device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type]
    File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create
    report( # type: ignore[unreachable]
    File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
    _LOGGER.warning(msg, stack_info=True)
    Stack (most recent call last):
    File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module>
    sys.exit(main())
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
    File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
    File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity
    device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type]
    File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create
    report( # type: ignore[unreachable]
    File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
    _LOGGER.warning(msg, stack_info=True)
    2022-01-10 10:37:58 WARNING (MainThread) [custom_components.esios.sensor] Setup of ESIOS PVPC (sensor.pvpc_horario_dha) finished
    2022-01-10 10:37:58 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that uses str for device registry entry_type. This is deprecated and will stop working in Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue.
    Stack (most recent call last):
    File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module>
    sys.exit(main())
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
    File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
    File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity
    device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type]
    File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create
    report( # type: ignore[unreachable]
    File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
    _LOGGER.warning(msg, stack_info=True)
    Stack (most recent call last):
    File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module>
    sys.exit(main())
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
    File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
    File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity
    device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type]
    File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create
    report( # type: ignore[unreachable]
    File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
    _LOGGER.warning(msg, stack_info=True)
    2022-01-10 10:37:58 WARNING (MainThread) [custom_components.esios.sensor] Setup of ESIOS CO2 intensity (sensor.esios_co2_intensity) finished
    2022-01-10 10:37:58 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that uses str for device registry entry_type. This is deprecated and will stop working in Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue.
    Stack (most recent call last):
    File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module>
    sys.exit(main())
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
    File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
    File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity
    device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type]
    File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create
    report( # type: ignore[unreachable]
    File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
    _LOGGER.warning(msg, stack_info=True)
    Stack (most recent call last):
    File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module>
    sys.exit(main())
    File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
    File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
    File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
    File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 500, in _async_add_entity
    device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type]
    File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 360, in async_get_or_create
    report( # type: ignore[unreachable]
    File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
    _LOGGER.warning(msg, stack_info=True)
    2022-01-10 10:37:58 WARNING (MainThread) [custom_components.esios.sensor] Setup of ESIOS Grid CO2 free percentage (sensor.esios_grid_co2_free_percentage) finished
    
  • Recuperar datos que están a 0 por el fallo

    Recuperar datos que están a 0 por el fallo

    Yo uso HOME ASSISTANT como estuvo fallando, tengo consumos negativos... hay manera de arreglar eso? (algo en la configuración que vaya pidiendo días antiguos poco a poco?)

    O algo que pueda haecer yo manualmente?

  • Sensor unit of measurement should use ISO 4217 monetary format

    Sensor unit of measurement should use ISO 4217 monetary format

    As per documentation the sensor should set the native_unit_of_measurement as EUR/kWh and not as €/kWh.

    In theory this would be required to get the sensor working as price source in the Energy panel, but still this doesn't seem to work in my case.

This library generate a new tlsconfig usable within go standard library configured with a self-signed certificate generated on the fly

sslcert This library generate a new tlsconfig usable within go standard library configured with a self-signed certificate generated on the fly. Exampl

Dec 17, 2022
This library aims to make it easier to interact with Ethereum through de Go programming language by adding a layer of abstraction through a new client on top of the go-ethereum library.

Simple ethereum client Simple ethereum client aims to make it easier for the developers to interact with Ethereum through a new layer of abstraction t

May 1, 2022
A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.

A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.

Jan 7, 2023
Port of Google's Keyczar cryptography library to Go

Important note: Keyczar is deprecated. The Keyczar developers recommend Tink. This is a port of Google's Keyczar library to Go. Copyright (c) 2011 Dam

Nov 28, 2022
whirlpool cryptographic hashing library

whirlpool.go A whirlpool hashing library for go Build status Setup $ go get github.com/jzelinskie/whirlpool Example package main import ( "fmt" "

Oct 12, 2022
Golang Library for automatic LetsEncrypt SSL Certificates

Obtains certificates automatically, and manages renewal and hot reload for your Golang application. It uses the LEGO Library to perform ACME challenges, and the mkcert utility to generate self-signed trusted certificates for local development.

Dec 23, 2022
Pure Go Kerberos library for clients and services

gokrb5 It is recommended to use the latest version: Development will be focused on the latest major version. New features will only be targeted at thi

Dec 13, 2022
:key: Idiotproof golang password validation library inspired by Python's passlib

passlib for go 100% modules-free. Python's passlib is quite an amazing library. I'm not sure there's a password library in existence with more thought

Dec 19, 2022
A convenience library for generating, comparing and inspecting password hashes using the scrypt KDF in Go 🔑

simple-scrypt simple-scrypt provides a convenience wrapper around Go's existing scrypt package that makes it easier to securely derive strong keys ("h

Dec 22, 2022
Easy to use encryption library for Go

encryptedbox EncryptedBox is an easy to use module for Go that can encrypt or sign any type of data. It is especially useful when you must serialize y

Jul 20, 2022
Pure Go GOST cryptographic functions library.

Pure Go GOST cryptographic functions library. GOST is GOvernment STandard of Russian Federation (and Soviet Union). GOST 28147-89 (RFC 5830) block cip

Aug 10, 2022
A Golang cryptocurrency trading API & Library. Support Binance, BitMEX, Deribit, Bybit, Huobi DM, OKEX Futures and more.
A Golang cryptocurrency trading API & Library. Support Binance, BitMEX, Deribit, Bybit, Huobi DM, OKEX Futures and more.

CREX 中文 | English CREX 是一个用Golang语言开发的量化交易库。支持tick级别数字币期货平台的回测和实盘。实盘与回测无缝切换,无需更改代码。 回测 示例 @backtest 交易结果 开源策略 https://github.com/coinrust/trading-stra

Nov 18, 2022
A Go library to create hashes with a builtin expiration

ExpiringLink This is a simple library for creating unique strings that have a built in expiration. The target use case is web links for password reset

Mar 3, 2022
Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK.
Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK.

Ethermint Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on to

Jan 3, 2023
The go-to Bitcoin Node (BN) Go library.

go-bitcoin Go wrapper for bitcoin RPC RPC services Start by creating a connection to a bitcoin node b, err := New("rcp host", rpc port, "rpc usernam

Feb 13, 2022
A golang library to use aes encrypt easier.

Aes a golang library to use aes encrypt easier. Install go get github.com/hanson/aes Document import import github.com/hanson/aes CBC orig := "hello

Dec 8, 2022
OpenZeppelin Contracts is a library for secure smart contract development.

A library for secure smart contract development. Build on a solid foundation of community-vetted code. Implementations of standards like ERC20 and ERC

Jan 5, 2023
Asu-go2js - Asu is a library to work with subtitles on ASS format.

asu-go2js Asu is a library to work with subtitles on ASS format. asu-go2js is a port of Asu (originally for .NET) written in Go and compiled to JavaSc

Jan 8, 2022
Collab - Library for Collaborative Editing (Operational Transform, CRDT) in Go

collab collab is a work-in-progress Go library for collaborating software systems, implementing Operational Transformation (OT), Commutative Replicati

Jan 9, 2022