#Change source of Spotify with automation

1 messages · Page 1 of 1 (latest)

robust hawk
#

Hey everyone,
I made a automation when I turn on the lights of my bedroom it turn off the lights of my living room. I want to add another action, if Spotify Is playing on the soundbar over Wi-Fi I want it to switch to my Google Nest.
I tried with spotcast but I didn't managed to make it work.

Is it possible ?

potent yacht
#

Hi, if I have Spotify running on my PC and use spotcast to set the entity ID of my Nest mini in an automation, it switches to the Nest Mini. So it should be possible to switch. Did you get spotcast generally up and running?

alias: Test
description: ""
triggers: []
conditions: []
actions:
  - action: spotcast.start
    metadata: {}
    data:
      entity_id: media_player.XXXXXXX
mode: single

If i run this it switches to my Nest mini. If you want a condition to check if it is running on your wlan soundbar im not sure. Maybe you can check with the official spotify integration (->source), but im not sure.

#
alias: Test
description: ""
triggers:
  - trigger: time
    at: "01:13:00"
conditions:
  - condition: state
    entity_id: media_player.spotify_xxxxx
    attribute: source
    state: PC-xxxxx
actions:
  - action: spotcast.start
    metadata: {}
    data:
      entity_id: media_player.xxxxxxxx
mode: single

yes that works

robust hawk
#

Thanks for that !
I tried, the condition work but the action don't.
I have this error message : "Action spotcast.start not found"

#

I used the action "spotcast.transfer_playback" and now it works
Thanks !

potent yacht
#

It looks like you are using a very old version of spotcast. The transfer_playback function was removed in v2.9.0. currently we are at version v4.0.0 . If you update to the new version, it may well be that some of your automations will no longer work as some things have changed.

robust hawk
#

I have this version
I download it from HACS