Multiple Plex Server Error, need clarification on what they Plex_Server key is

I am getting this error, I go to the link and look at the page. There is no documentation of the key Plex_server or anything about writing a script when you have multiple servers, unless I’m missing it?

I’m trying to run this script…

service: media_player.play_media
data:
  entity_id: media_player.baby_speaker
  media_content_type: playlist
  media_content_id: 'plex://{"playlist_name": "Baby Sleep", "shuffle": "1"}'

but getting this error…
Where in the code above would I add which plex server I want to play it on?

Logger: homeassistant.components.plex
Source: components/plex/services.py:92
Integration: Plex Media Server ([documentation](https://www.home-assistant.io/integrations/plex), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+plex%22))
First occurred: 6:55:01 PM (3 occurrences)
Last logged: 7:04:42 PM

Multiple Plex servers configured, choose with 'plex_server' key: ['Plex1', 'Plex2']

Did you try:

service: media_player.play_media
data:
  entity_id: media_player.baby_speaker
  plex_server: Plex1
  media_content_type: playlist
  media_content_id: 'plex://{"playlist_name": "Baby Sleep", "shuffle": "1"}'

Gives me an error that extra keys are not allowed

Put it in the media_content_id:

'plex://{"plex_server": "Plex1", "playlist_name": "Baby Sleep", "shuffle": "1"}'
2 Likes

This worked! Thanks!

1 Like