ha_epex_spot
ha_epex_spot copied to clipboard
SmartEnergy - EPEX Spot: Get lowest price interval call fails
Trying to get lowest (or highest) price interval service call fails with SmartEnergy. Same thing works for Awattar (at).
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'