Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Config file:
- spotcast:
- sp_dc: !secret sp_dc
- sp_key: !secret sp_key
- # This is my lovelace card code:
- "type: 'custom:spotify-card'
- limit: 10
- spotify_entity: media_player.spotify_d
- playlist_type: default
- account: default
- grid_covers_per_row: 4
- display_style: list
- grid_show_title: true
- grid_center_covers: true"
- # Scrip file
- spotify_music:
- alias: Play selected spotify playlist
- sequence:
- - service: media_player.volume_set
- data:
- entity_id: media_player.spotify_d
- volume_level: '0.4'
- - service: media_player.select_source
- data_template:
- entity_id: media_player.spotify_d
- source: '{% if is_state("input_select.spotify_source", "Køkken") %} media_player.googlehome298
- {% elif is_state("input_select.spotify_source", "Kontor") %} media_player.kon
- {% elif is_state("input_select.spotify_source", "Stuen") %} media_player.nesthub
- {% elif is_state("input_select.spotify_source", "Bad") %} media_player.bad
- {% elif is_state("input_select.spotify_source", "Garagen") %} media_player.stu
- {% elif is_state("input_select.spotify_source", "Kælderen") %} media_player.kok
- {% endif %}
- '
- - service: media_player.play_media
- data_template:
- entity_id: media_player.spotify_d
- media_content_type: playlist
- media_content_id: '{% if is_state("input_select.spotify_playlist", "Gym
- ") %} spotify:playlist:7FvCHKzqYNtNCNdZ83bFYm {% elif is_state("input_select.spotify_playlist",
- "Bass") %} spotify:playlist:37i9dQZF1DX9Bom9R0tCgx {% elif is_state("input_select.spotify_playlist",
- "Høj") %} spotify:playlist:37i9dQZF1DX5SrqpuffRKX {% elif is_state("input_select.spotify_playlist",
- "Volbeat") %} spotify:playlist:37i9dQZF1DWYrXu9rm1zUZ {% elif is_state("input_select.spotify_playlist",
- "Ren") %} spotify:playlist:37i9dQZF1DX6IdqACeHRY7 {% elif is_state("input_select.spotify_playlist",
- "Summer Road") %} spotify:playlist:37i9dQZF1DX0YBu6Mak936 {% elif is_state("input_select.spotify_playlist",
- "Musik") %} spotify:playlist:37i9dQZF1DXa2rUkfKRm5c {% elif
- is_state("input_select.spotify_playlist", "Beach") %} spotify:playlist:37i9dQZF1DX4Y4RhrZqHhr
- {% endif %}}
- '
- # imput file
- spotify_playlist:
- name: 'Playlist:'
- options:
- - Gym
- - Bass
- - Høj
- - Volbeat
- - Ren
- - Summer Road
- - Musik
- - Beach
- icon: mdi:spotify
- spotify_source:
- name: 'Source:'
- options:
- - Køkken
- - Kontor
- - Stuen
- - Bad
- - Garagen
- - Kælderen
- initial: Kontor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement