custom-components / sensor.nintendo_wishlist

A sensor that monitors a Nintendo Switch wish list for when games are on sale.
Apache License 2.0
17 stars 6 forks source link

Problem with component after upgrade 2023.12.3 #22

Closed mbonacina closed 10 months ago

mbonacina commented 10 months ago

After updating home assistant to the latest version (2023.12.3) my component stopped working. All my sensors are in "unavailable". I'm using v3 and this is my setup:

nintendo_wishlist: scan_interval:

at least one of the following must be specified:

 days: 0
 hours: 1
 minutes: 0
 seconds: 0
 milliseconds: 0

country: IT wishlist:

Can you help me solve it?

boralyl commented 10 months ago

@mbonacina Do you have any errors related to this integration in the log? I tried out your configuration locally and everything loads as expected. It shows both Little Nightmares and Little Nightmares 2 are on sale now.

I'm also on 2023.12.3

mbonacina commented 10 months ago

This is the log:

Logger: custom_components.nintendo_wishlist Source: helpers/update_coordinator.py:300 Integration: Nintendo Wishlist Component (documentation) First occurred: 16:14:35 (2 occurrences) Last logged: 16:14:53

Unexpected error fetching nintendo_wishlist data: 'image_url' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nintendo_wishlist/eshop.py", line 106, in fetch_on_sale return await self.fetch_method() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nintendo_wishlist/eshop.py", line 202, in fetch_eu results = await self._get_eu_page(page_num) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nintendo_wishlist/eshop.py", line 175, in _get_eu_page self.filter_wishlist_matches(data["response"]["docs"]) File "/config/custom_components/nintendo_wishlist/eshop.py", line 222, in filter_wishlist_matches switch_game = self.get_eu_switch_game(game) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nintendo_wishlist/eshop.py", line 182, in get_eu_switch_game image_url = game["image_url"]


KeyError: 'image_url'
mbonacina commented 10 months ago

Sorry, the configuration in the first message is wrong. I got it from an old config file and didn't realize it.

This is the configuration currently active on my HA.

nintendo_wishlist: scan_interval:

at least one of the following must be specified:

days: 0
hours: 1
minutes: 0
seconds: 0
milliseconds: 0

country: IT wishlist:

boralyl commented 10 months ago

Thank you, that should help me narrow down the problem. It looks like one of the games doesn't have an image but it would be helpful to see it in action.

boralyl commented 10 months ago

@mbonacina This should be fixed in the latest release. https://github.com/custom-components/sensor.nintendo_wishlist/releases/tag/3.1.13

mbonacina commented 10 months ago

@boralyl Thanks for the support and Merry Christmas! :)