JaccoR / hass-entso-e

Integration for Home Assistant to fetch day ahead energy prices from European countries via ENTSO-e Transparency Platform
Apache License 2.0
177 stars 29 forks source link

No matching data #7

Closed SVH-Powel closed 2 years ago

SVH-Powel commented 2 years ago

I got this error. Not sure what the reason is, but my country is Norway and we have 5 or 6 different price regions. But I could not set region in the configuration, only country.

2022-10-03 09:51:22.201 ERROR (MainThread) [custom_components.entsoe.coordinator] Unexpected error fetching ENTSO-e coordinator data: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/entsoe/coordinator.py", line 42, in _async_update_data data_today = await self.fetch_prices(today, tomorrow) File "/config/custom_components/entsoe/coordinator.py", line 50, in fetch_prices resp = await self.hass.async_add_executor_job( File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/entsoe/coordinator.py", line 63, in api_update return client.query_day_ahead_prices(self.country, start=start_date, end=end_date) File "/usr/local/lib/python3.10/site-packages/entsoe/decorators.py", line 106, in year_wrapper raise NoMatchingDataError entsoe.exceptions.NoMatchingDataError

JaccoR commented 2 years ago

Forgot about countries having multiple price regions. I fixed it now by adding all market areas for sweden, denmark, norway and italy. Don't forget to re-add the integration after updating.