Problem with Plex

Hi all,
I’m trying to configure Home Assistant to interact with my Plex Media Server.

First, I followed this procedure and I had no issues: I rebooted HA and all seems ok with no errors in the log.

Then, as I first test, I tried to play a song in one of my GoogleMini speaker, so I created a trigger with this action:

  service: media_player.play_media
      entity_id: media_player.GoogleMiniSpeaker1
      media_content_id: { \“library_name\” : \“Music\”, \“artist_name\” : \“Muse\”, \“album_name\” : \“Black Holes and Revelations\”, \“track_name\” : \“Starlight\”, \“shuffle\”: \“0\” }
      media_content_type: MUSIC

But when I activate the trigger nothing happened, and I have this error in the log:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/", line 277, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/switch/", line 154, in async_turn_on
    await self._on_script.async_run(context=self._context)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/", line 130, in async_run
    await self._handle_action(action, variables, context)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/", line 172, in _handle_action
    action, variables, context)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/", line 261, in _async_call_service
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/", line 81, in async_call_from_config
    domain, service_name, service_data, blocking=blocking, context=context)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/", line 1101, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/", line 267, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/", line 589, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.6/site-packages/voluptuous/", line 427, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: value should be a string for dictionary value @ data['media_content_id']

What’s wrong?

Thank you in advance

I changed the code in this way
(quotation marks " everywhere, and not “ ” as suggested in the component page example ):

  service: media_player.play_media
      "entity_id": "media_player.GoogleMiniSpeaker1"
      "media_content_id": "{ \"library_name\" : \"Music\", \"artist_name\" : \"Muse\", \"album_name\" : \"Black Holes and Revelations\", \"track_name\" : \"Starlight\", \"shuffle\": \"0\" }"
      "media_content_type": "MUSIC"

Now I get no errors in the log and hear the “pling” sound of the google mini speaker activation, but the song is not played.
Any idea of what I’m still doing wrong?

May I take this opportunity to wish you all a Happy Christmas!

Same here with a playlist:

  - data:
      entity_id: media_player.plex_mi_box
      media_content_id: "{ \"playlist_name\": \"Kenneth\", \"shuffle\": \"1\"}"
      media_content_type: PLAYLIST
    service: media_player.play_media

Even of it’s not consistent with the documentation, quoting media_content_id fixed the “value should be a string for dictionary value @ data['media_content_id']” issue. The log file is now clean but nothing is happening when I trig the action. Have you ever resolved the issue?