Tts.cloud_say not working since update to HA 2022.5.0 / Error Media Source not loaded

Any script or automation using tts.cloud_say isn’t working anymore since I upgraded to 2022.5.0 and raises an error in home-assistant.log:

2022-05-05 17:31:39 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140402381049040] Media Source not loaded
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 189, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1664, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 217, in async_say_handle
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1664, 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 677, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 608, in async_play_media
    sourced_media = await media_source.async_resolve_media(self.hass, media_id)
  File "/usr/src/homeassistant/homeassistant/components/media_source/__init__.py", line 130, in async_resolve_media
    raise Unresolvable("Media Source not loaded")
homeassistant.components.media_source.error.Unresolvable: Media Source not loaded

Even using the tts test from the Home Assistant Cloud configuration raises the same error:

Anyone having the same problem?

2 Likes

Same issue here.

Fixed it by adding

media_source:

to my configuration.yaml and then restarting Home Assistant.

Ref: Media Source - Home Assistant

9 Likes

Confirm, don’t work.

Thank you very much!!

1 Like

Confrimed: needed to add: “media_source:” to configuration file.

Strange this is not mentioned in the breaking changes…

Thanks for the hint!

I think it’s simply a bug. The docs state, that the integration should be configured automatically, if any integration implements a media source:

This integration is configured automatically through default_config or if another integration implements a media source.

This default behavior seems to be broken in 2022.5.

This fix doesn’t work for me.
I already had media_source: included in my configuration before upgrading to core v2022.5.0.

I’ve added media_source: to the config, but it’s changed nothing

Adding media_source: worked for me. Thanks!