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.

Spotcast is not working when using cast as custom component

See original GitHub issue

Bug Ticket

Describe the bug

I really like it when Cast devices never returned to state off in HA 2022.2.1 - 2022.2.3. This was reverted in 2022.2.4. So I tried to run cast as custom component, which works fine for the cast devices themselves. However, when doing so, the cast devices can no longer be found by Spotcast. The Chromecast sensor does not show any devices. There is no issue concerning Spotcast in the logs, just the info that the devices are updated, with no devices found.

The actual change to not show them as off has no effect on this. Even if I just download the cast component, put it in custom_components without any changes (besides adding a version number) Spotcast can not find any cast devices.

  • [ X ] Using latest version of spotcast
  • [ X ] I have setup the Spotify integration in Home Assistant
  • [ X ] I am using multiple accounts
  • [ X ] Using latest stable version of Home Assistant
  • [ X ] I have Spotify Premium
  • [ X ] I’m attaching relevant logs with level debug for component spotcast (see README)
  • [ X ] I’m using entity_id in the service call and have tried device_name but the issue remains

Environment

  • Installation type: HA OS
  • HA version: 2022.4.7
  • spotcast version: v3.6.29

Configuration

spotcast:
  sp_dc: !secret sp_dc
  sp_key: !secret sp_key
  country: NL
  accounts:
    martijn:
      sp_dc: !secret sp_dc_martijn
      sp_key: !secret sp_key_martijn
    marleen:
      sp_dc: !secret sp_dc_marleen
      sp_key: !secret sp_key_marleen
    pepijn:
      sp_dc: !secret sp_dc
      sp_key: !secret sp_key
    floris:
      sp_dc: !secret sp_dc_floris
      sp_key: !secret sp_key_floris

sensor:

platform: spotcast
country: NL

Service Call

N/A

Additional context

N/A

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hmmbobcommented, Apr 28, 2022

pychromecast was bumped in 2022.5, did you download the cast component from 2022.5 when using it with 2022.5?

0reactions
TheFescommented, Sep 19, 2022

I’m using HA OS, so the PYTHONPATH is set as default in HA OS.

To me it looks like it still tries to use the native core cast component, and not my own custom_component cast version.

I did change it to this, to avoid the relative import. That also works

from custom_components.cast.media_player import CastDevice
Read more comments on GitHub >

github_iconTop Results From Across the Web

custom component to start playback on an idle chromecast ...
I'm wondering if there is a problem with me using the existing ... set up by the cast integration and is independent of...
Read more >
Spotcast is not working when using cast as custom component
However, when doing so, the cast devices can no longer be found by Spotcast. The Chromecast sensor does not show any devices. There...
Read more >
Spotify and ha : r/homeassistant - Reddit
Try spotcast custom component.
Read more >
Smart TTS for Home Assistant (flow) - Node-RED
If you know how to fix any of those issues please contact me ... Assistant Google Cast integration\nIf you are using Alexa speakers\n-...
Read more >
fondberg/spotcast: Home assistant custom component to start ...
If the link is broken, please click the button below to view the snapshot at that time. Spotcast. Home Assistant custom component to...
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