Hi, I’ve tried making an automation to play a Spotify playlist in the morning on my laptop, but it hasn’t worked so far. It’s coupled with a Philips Hue light, the idea being that I’d like the sound to go off a bit later if the light doesn’t manage to wake me up. Here’s what I currently have:
alias: Bedroom Wake Up
description: ''
trigger:
- platform: time
at: input_datetime.wake_up
condition: []
action:
- service: hue.activate_scene
data:
transition: 60
target:
entity_id: scene.bedroom_concentrate
- service: input_number.set_value
data:
value: 0
target:
entity_id: input_number.bedroom_state
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- service: media_player.select_source
data:
source: DESKTOP-0VVP0U1
target:
entity_id: media_player.spotify_tsuki
- service: media_player.play_media
target:
entity_id: media_player.spotify_tsuki
data:
media_content_id: spotify:playlist:37i9dQZF1DX4PP3DA4J0N8
media_content_type: spotify://playlist
metadata:
title: Nature Sounds
thumbnail: https://i.scdn.co/image/ab67706f0000000325679ec48f09bd70884d4184
media_class: playlist
children_media_class: track
navigateIds:
- {}
- media_content_type: spotify://current_user_playlists
media_content_id: current_user_playlists
- media_content_type: spotify://playlist
media_content_id: spotify:playlist:37i9dQZF1DX4PP3DA4J0N8
mode: single
The first time it failed I had a guess that since the player on the laptop isn’t active for the whole night it couldn’t just start playing, so I added the media_player.select_source
bit.
Looking through the logbook this morning seems like it just paused it instead of playing:
At this point I don’t know what I’m missing, can anyone give me a hand with this. Thanks.