question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cant start spotcast on chromecast device.

See original GitHub issue

Version Homeassistant: 2021.4.3 Spotcast: v.3.5.2

Stopped working on latest update:

Trying to run script to start playback on Google Mini

wakeup_spotify_oliver:
  alias: Kjør vekkesang for Oliver
  sequence:
  - service: spotcast.start
    data:
      entity_id: media_player.rommet_til_oliver
      uri: spotify:playlist:4oAD9NGqlOj87mbkMko52b
      random_song: true
      start_volume: 70
  mode: single

I have tried switching from entity_id to device_name with same issue:

Log error as follows:

Logger: homeassistant Source: custom_components/spotcast/init.py:564 First occurred: 10:51:58 (3 occurrences) Last logged: 12:39:55

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 392, in _async_run
    return await self.script.async_run(variables, context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1195, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 341, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 359, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 559, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1519, in _execute_service
    await self._hass.async_add_executor_job(handler.job.target, service_call)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/spotcast/__init__.py", line 377, in start_casting
    spotify_device_id = spotify_cast_device.getSpotifyDeviceId(client)
  File "/config/custom_components/spotcast/__init__.py", line 564, in getSpotifyDeviceId
    for device in devices_available["devices"]:
TypeError: 'NoneType' object is not iterable

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
robteschcommented, Apr 13, 2021

PR submitted

2reactions
fondbergcommented, Apr 12, 2021

Yes! We now need the devices from spotify media player as it has the correct scopes in its token.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Playing on chromecast devices doesn't work #245 - GitHub
I couldn't play to chromecast devices. I set everything up according to the README: spotify integration, spotcast, lovelace-spotify-card.
Read more >
custom component to start playback on an idle chromecast ...
I do have a media player entity for my chromecast device though (perhaps that's what you meant?), called 'media_player.study_display'. I tried ...
Read more >
Can't find Chromecast in the Google Home app - Android
If your mobile device can't find your Chromecast during setup, try the following solutions. Step 1. Check your internet connection Make sure Chromecast...
Read more >
spotcast - Bountysource
Calling service spotcast.start on an echo device after being idle for a few hours will drop ... Anybody know why I can't send...
Read more >
HACS - Spotcast configuration: needs some help - Reddit
New comments cannot be posted and votes cannot be cast ... Choose spotcast.start and choose your casting device from the dropdown, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found