{"id":5008,"date":"2020-12-17T14:50:40","date_gmt":"2020-12-17T14:50:40","guid":{"rendered":"https:\/\/robertjwallace.com\/?p=5008"},"modified":"2023-07-18T23:22:28","modified_gmt":"2023-07-18T23:22:28","slug":"update-creating-home-assistant-interface-to-alexa-playlists","status":"publish","type":"post","link":"https:\/\/robertjwallace.com\/es\/update-creating-home-assistant-interface-to-alexa-playlists\/","title":{"rendered":"Update: Creating home assistant interface to alexa playlists"},"content":{"rendered":"<p>I stumbled upon <a href=\"https:\/\/github.com\/custom-components\/alexa_media_player\/wiki#what-this-is\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/custom-components\/alexa_media_player\/wiki#what-this-is<\/a> which gave me the information I needed to directly control my echo device, instead of having one echo command via voice another.<\/p>\n\n\n\n<p>Read my post <a href=\"https:\/\/robertjwallace.com\/es\/creating-home-assistant-interface-to-alexa-playlists\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/robertjwallace.com\/creating-home-assistant-interface-to-alexa-playlists\/<\/a> for background.<\/p>\n\n\n\n<p>The difference between what I was doing in that post and what I am doing now is in the scripts.yaml file.  The code to directly control my echo is:<\/p>\n\n\n\n<!--more-->\n\n\n\n<pre class=\"wp-block-code\"><code>message_alexa:\n  sequence:\n    service: media_player.play_media\n    data:\n      entity_id: media_player.echo_living_room\n      media_content_id: \"Alexa play {{ playlist }} playlist on echo living room\"\n      media_content_type: custom\nmessage_pandora:\n  sequence:\n    service: media_player.play_media\n    data:\n      entity_id: media_player.echo_living_room\n      media_content_id: \"Alexa play {{ station }} on pandora on echo living room\"\n      media_content_type: custom<\/code><\/pre>\n\n\n\n<p>You can see that I added Pandora through Alexa and also that I am now passing parameters to the script. I am passing the playlist to the message_alexa script and am passing the station to the message_pandora script.<\/p>\n\n\n\n<p>The Lovelace card code now looks like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>type: 'custom:mini-media-player'\nentity: media_player.echo_living_room\nicon: 'mdi:amazon'\nartwork: cover\nshortcuts:\n  columns: 2\n  buttons:\n    - icon: 'mdi:account-cowboy-hat'\n      name: Country\n      type: script\n      id: message_alexa\n      data:\n        playlist: country\n    - icon: 'mdi:baguette'\n      name: French\n      type: script\n      id: message_alexa\n      data:\n        playlist: french\n    - icon: 'mdi:piano'\n      name: David Lanz\n      type: script\n      id: message_alexa\n      data:\n        playlist: david lanz\n    - icon: 'mdi:cat'\n      name: Easy Listening\n      type: script\n      id: message_alexa\n      data:\n        playlist: easy\n    - icon: 'mdi:music-circle'\n      name: Irish Tenors Pandora\n      type: script\n      id: message_pandora\n      data:\n        station: Irish Tenors\ntts:\n  platform: alexa\n  enity_id: media_player.echo_living_room\n<\/code><\/pre>\n\n\n\n<p>The next steps will be to add check boxes to select which echo device to use.<\/p>","protected":false},"excerpt":{"rendered":"<p>I stumbled upon https:\/\/github.com\/custom-components\/alexa_media_player\/wiki#what-this-is which gave me the information I needed to directly control my echo device, instead of having one echo command via voice another. Read my post https:\/\/robertjwallace.com\/creating-home-assistant-interface-to-alexa-playlists\/ for background. The difference between what I was doing in that post and what I am doing now is in the scripts.yaml file. The code &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/robertjwallace.com\/es\/update-creating-home-assistant-interface-to-alexa-playlists\/\" class=\"more-link\">Continuar leyendo<span class=\"screen-reader-text\"> &#8220;Update: Creating home assistant interface to alexa playlists&#8221;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_eb_attr":"","footnotes":""},"categories":[143,166],"tags":[161],"class_list":["post-5008","post","type-post","status-publish","format-standard","hentry","category-computer-stuff","category-home-assistant","tag-home-automation"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Bob","author_link":"https:\/\/robertjwallace.com\/es\/author\/admin\/"},"_links":{"self":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/5008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/comments?post=5008"}],"version-history":[{"count":2,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/5008\/revisions"}],"predecessor-version":[{"id":5011,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/5008\/revisions\/5011"}],"wp:attachment":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/media?parent=5008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/categories?post=5008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/tags?post=5008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}