When you copy/paste you should use the “</>” (see above in the bar line of the post/answer you are currently writing) so we have the code with indentation like in HA as indentation is very critical for flawless execution… So based on what you submitted, indentation is not correct but I am sure it is not like this… It should be something like:
trigger:
- platform: time
at: “22:25:00”
condition: []
action:
service: media_player.play_media
target:
entity_id: media_player.marantz_sr6007
data:
media_content_id: >-
http://playerservices.streamtheworld.com/api/livestream-redirect/RADIO10.mp3
media_content_type: music
mode: single
Logger: homeassistant.components.automation.nieuwe_automatisering
Source: components/media_player/__init__.py:762
Integration: Automatisering (documentation, issues)
First occurred: 13:38:53 (2 occurrences)
Last logged: 13:38:53
Radio: Error executing script. Unexpected error for call_service at pos 1:
While executing automation automation.nieuwe_automatisering
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 766, in async_play_media
await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 762, in play_media
raise NotImplementedError()
NotImplementedError
Ok, so I have tried the same automation but used a different device and everything worked fine.
So it clearly had to do something with the device (marantz).
Using the UI to configure the automation, when selecting a device it automatically states that “Media browsing is not available for this device”
I have tried to work around this, by using the code editor and manually change the automation that worked with the different device, and change it to Marantz, it still did not work.