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:
Same issue. Removed base_url several updates back and tts has worked fine, until upgrading to 2022.5. Adding media_source: in configuration did not fix tts for me, so I rolled back.
Adding media_source: did not work for me. I’m using homepod mini’s in my setup and this stopped working with 2022.5 update. Could this be because homepod’s are not compatible with the media browser?
I have the same issue with my homepod mini after the 2022.5 core update.
How have you integrated your homepod minis? I have been using the apple_airplayer integration via HACS.
As the error message states, you need to have media_source integration loaded. This is part of the default_config which is loaded by default. If you remove default_config from your configuration you are responsible yourself to keep up to date with loading the integrations that are loaded by default. You can find those on the default config documentation.
Any player that is able to play TTS is able to play media sources, but it needs to add a few lines of code to support this. All media players in Home Assistant have been upgraded to work with TTS via media sources. 2 missed the 2022.5 release but will be in the next release: vlc and gstreamer.
So if you are experiencing this issue:
load media_source if you have removed default_config
Remove the base_url from TTS configuration. If you have configured an SSL certificate in Home Assistant, make sure you have configured your internal and external URL correctly. If you don’t use SSL, keep default settings and it should all work fine.
if you’re using a custom integration that has an equivalent in core, remove the custom integration. If you continue to experience being unable to play with the core integration, open a new issue for that exact core integration (not the custom one).
if it’s a custom integration and there is no core version, make sure you update to the latest version of the custom integration. If problem persists, open an issue with the custom integration.