Problem google home with plex

Hello,

I search to create a script for start a plex playlist on my google home.
I have create two scripts :
Script one :
Start plex playlist on my computer:

1595955749797:
alias: Démarrage Playlist - Plex
sequence:

  • data:
    media_content_id: ‘{ “playlist_name” : “Therapie taxi”, “shuffle”: “1” }’
    media_content_type: PLAYLIST
    entity_id: media_player.plex_web_pc_portable
    service: media_player.play_media

it’s ok and work.

Seconds script it’s same but on my google home mini

1524955749797:
alias: Démarrage Playlist - Plex google home
sequence:

  • data:
    media_content_id: ‘{ “playlist_name” : “Therapie taxi”, “shuffle”: “1” }’
    media_content_type: PLAYLIST
    entity_id: media_player.google_home_salon
    service: media_player.play_media

This script doesn’t work. My google home do “Ding” but nothing start…

Anyone have a idea ?

The media_player.play_media service and parameters depend on the entity passed in. The first example uses the Plex integration while the second uses the Google Home integration. Unfortunately they can’t be used the same way and it won’t understand the Plex-specific payload you’re passing in.

Ok, i understand. I have create a new plex cast on my google home and retry. I have change variable “media_player.google_home_salon” by cast like “media_player.plex_plex_cast_chromecast”. it’s the same, it doesn’t work.
anyone know a payload for start music playlist on google home ?

see: https://www.home-assistant.io/integrations/cast/#plex for info on casting Plex to chromecast device. You’ll need to add the ‘plex://’ prefix in the media_content_id
Sample below works for me:

alias: Play Plex music
sequence:
  - service: media_player.play_media
    data:
      entity_id: 'media_player.hub'
      media_content_id: 'plex://{ "playlist_name": "ALL", "shuffle": "1" }'
      media_content_type: PLAYLIST
mode: single
icon: 'mdi:play'

Thanks for bumping the thread. I forgot to come back to remind about the new feature. :+1: