elden1337 / hass-peaq

Home Assistant custom component that aids in both peak-level energy charge avoidance and spotprice-aware charging.
Other
47 stars 7 forks source link

Unhandled peaqerror when bad spotprice-update #356

Open elden1337 opened 1 month ago

elden1337 commented 1 month ago
2024-07-24 20:35:59.919 ERROR (MainThread) [peaqevcore.common.spotprice.models.spotprice_dto] Could not parse today's prices. Unsolveable error. 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/peaqevcore/common/spotprice/models/spotprice_dto.py", line 25, in set_model
    self.today = list(ret.attributes.get("today"))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-07-24 20:35:59.921 WARNING (MainThread) [peaqevcore.common.spotprice.spotpricebase] Possible issue detected with None in nordpool dates.
2024-07-24 20:35:59.922 ERROR (MainThread) [custom_components.peaqnext.service.spotprice.spotprice_dto] Could not parse today's prices from Nordpool. Unsolveable error. 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/config/custom_components/peaqnext/service/spotprice/spotprice_dto.py", line 21, in set_model
    self.today = list(ret.attributes.get("today"))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-07-24 20:36:01.353 WARNING (MainThread) [custom_components.peaqhvac.service.hub.hub] Unable to get price for hour 2024-07-24 20:00:00. min_price: 0.1, num_prices_today: 0
2024-07-24 20:36:01.370 ERROR (MainThread) [peaqevcore.services.hoursselection_service_new.hourselection_service] Exception in adding prices today! list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/peaqevcore/services/hoursselection_service_new/hourselection_service.py", line 73, in clean_prices
    price_dict[h] = prices[idx]
                    ~~~~~~^^^^^
IndexError: list index out of range
2024-07-24 20:36:01.372 ERROR (MainThread) [peaqevcore.services.hoursselection_service_new.hourselection_service] Exception in updating prices! Please report a bug and include the following: list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/peaqevcore/services/hoursselection_service_new/hourselection_service.py", line 90, in async_update_prices
    price_dict = self.clean_prices(prices, prices_tomorrow)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/peaqevcore/services/hoursselection_service_new/hourselection_service.py", line 73, in clean_prices
    price_dict[h] = prices[idx]
                    ~~~~~~^^^^^
IndexError: list index out of range
2024-07-24 20:36:04.265 ERROR (MainThread) [custom_components.peaqev.peaqservice.hub.state_changes.state_changes] async_update_sensor_internal for sensor.nordpool_kwh_se3_sek_3_10_025: strptime() argument 1 must be str, not datetime.date
elden1337 commented 1 month ago

To repro this, reload nordpool integration only.