Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error fetching Spotify Devices data - Smartwatch #129937

Closed
holdestmade opened this issue Nov 6, 2024 · 1 comment · Fixed by #129938
Closed

Unexpected error fetching Spotify Devices data - Smartwatch #129937

holdestmade opened this issue Nov 6, 2024 · 1 comment · Fixed by #129938

Comments

@holdestmade
Copy link

The problem

Unexpected error fetching xxxxxxxxx Devices data showing in logs

What version of Home Assistant Core has the issue?

2024.11.0b6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Spotify

Link to integration documentation on our website

https://www.home-assistant.io/integrations/spotify/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Traceback (most recent call last):
  File "<string>", line 24, in __mashumaro_from_dict_json__
  File "/usr/local/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: 'Smartwatch' is not a valid DeviceType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 9, in __mashumaro_from_json__
  File "<string>", line 26, in __mashumaro_from_dict_json__
mashumaro.exceptions.InvalidFieldValue: Field "device_type" of type DeviceType in Device has invalid value 'Smartwatch'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 382, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 279, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/spotify/__init__.py", line 72, in _update_devices
    return await spotify.get_devices()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/spotifyaio/spotify.py", line 324, in get_devices
    return Devices.from_json(response).devices
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 11, in __mashumaro_from_json__
mashumaro.exceptions.InvalidFieldValue: Field "devices" of type list[Device] in Devices has invalid value [{'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Living Room Soundbar', 'supports_volume': True, 'type': 'Speaker', 'volume_percent': 6}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'SM-R920', 'supports_volume': False, 'type': 'Smartwatch', 'volume_percent': 100}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Bedroom Pair', 'supports_volume': True, 'type': 'Speaker', 'volume_percent': 20}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Garage', 'supports_volume': True, 'type': 'Speaker', 'volume_percent': 83}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Bens Room', 'supports_volume': True, 'type': 'Speaker', 'volume_percent': 6}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Landing', 'supports_volume': True, 'type': 'Speaker', 'volume_percent': 20}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Workshop', 'supports_volume': False, 'type': 'Speaker', 'volume_percent': 40}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Alices Room', 'supports_volume': True, 'type': 'Speaker', 'volume_percent': 20}, {'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'is_active': False, 'is_private_session': False, 'is_restricted': False, 'name': 'Everywhere', 'supports_volume': True, 'type': 'Speaker', 'volume_percent': 20}]

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Nov 6, 2024

Hey there @frenck, @joostlek, mind taking a look at this issue as it has been labeled with an integration (spotify) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of spotify can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign spotify Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


spotify documentation
spotify source
(message by IssueLinks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants