Help needed on Media Player automation

help needed on a very basic automation. I just want to trigger automation to play a specific music file on one of my google mini speaker, but automation doesn’t seem to trigger properly, here’s my automation:

alias: good night
description: ''
  - type: value
    platform: device
    device_id: b53114d6168c505d9f90a25083d90972
    entity_id: sensor.front_door_bell_storage_total
    domain: sensor
    above: 40
condition: []
  - service: media_player.media_play
      entity_id: media_player.bed_speaker
      media_content_id: '/local/music/whitenoise/ocean.mp3'
      media_content_type: 'music'
mode: single

trigger doesn’t matter, I just selected a random thing as place holder for now.

for the media content id, I tried: that and the full path:


I just click on the run action button in the automation page, but nothing happens.

I can manually play the music, and when I do, the developer console is showing these states:

volume_level: 0.27000001072883606
is_volume_muted: false
media_content_id: >-
media_duration: 21203.472
media_position: 1420.941346
media_position_updated_at: '2021-11-08T06:26:39.227945+00:00'
app_id: CC1AD845
app_name: Default Media Receiver
entity_picture_local: null
friendly_name: Bed Speaker
supported_features: 152463

what am I missing?

Hi there, the problem is with the media_content_id.
please try with the media_content_id like the below.


You had an extra /media in the file location.