mampfes / ha_epex_spot

Adds EPEX Spot data to Home Assistant.
MIT License
126 stars 19 forks source link

SmartEnergy - EPEX Spot: Get lowest price interval call fails #141

Open clutwo opened 1 month ago

clutwo commented 1 month ago

Trying to get lowest (or highest) price interval service call fails with SmartEnergy. Same thing works for Awattar (at).

image

As far as I can tell, this is the relevant log:

2024-07-13 12:51:17.777 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140305739194160] Error handling message: Unknown error (unknown_error) Clemens from 192.168.1.7 (Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 793, in handle_execute_script script_result = await script_obj.async_run( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1770, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 465, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 529, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 559, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 527, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/epex_spot/init.py", line 118, in get_lowest_price_interval return _find_extreme_price_interval(call, lambda a, b: a < b) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/epex_spot/init.py", line 148, in _find_extreme_price_interval coordinator = entries[next(iter(device_entry.config_entries))]


KeyError: '01J2JXSEXMM33Y0Z7GN7NXPJCN'
bdynamic commented 1 month ago

I have the same Problem. Before reporting this error I updated to the latest git version

Update: Switching from SMARD.de backend to Tibber (de) Backend solved the problem for me

This is my error log:

`2024-07-14 10:27:44.645 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration epex_spot 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 2024-07-14 10:27:56.258 ERROR (MainThread) [custom_components.epex_spot.SourceShell] no data found for <custom_components.epex_spot.EPEXSpot.SMARD.SMARD object at 0x7f8468a4e0> 2024-07-14 10:27:56.260 ERROR (MainThread) [custom_components.epex_spot.SourceShell] no data found for <custom_components.epex_spot.EPEXSpot.SMARD.SMARD object at 0x7f8468a4e0> 2024-07-14 10:27:57.022 ERROR (SyncWorker_2) [pyhik.hikvision] Unable to fetch deviceInfo, error: HTTPConnectionPool(host='192.168.188.89', port=80): Max retries exceeded with url: /ISAPI/System/deviceInfo (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7fbb1850>: Failed to establish a new connection: [Errno 113] Host is unreachable')) 2024-07-14 10:27:57.238 ERROR (SyncWorker_2) [homeassistant.components.hikvision.binary_sensor] Hikvision event stream has no data, unable to set up 2024-07-14 10:27:57.425 ERROR (MainThread) [tibber.home] Error in rt_subscribe Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/tibber/home.py", line 439, in _start async for data in self._tibber_control.realtime.sub_manager.session.subscribe( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Client' object has no attribute 'session' 2024-07-14 10:28:05.550 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ (as_timestamp(now()) + states('sensor.print_time_left') | int) | timestamp_custom('%Y-%m-%d %H:%M:%S', true) }}) renders=2> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 573, in async_render render_result = _render_with_context(self.template, compiled, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2364, in _render_with_context return template.render(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "