home-assistant/core · warning · ServiceValidationError
Source {source} not found
Error message
Source {source} not found What it means
ServiceValidationError from async_select_source: the requested source name matches neither any input's text/id nor any preset name on the player. Presets take priority when names collide. The call aborts without changing playback.
Source
Thrown at homeassistant/components/bluesound/media_player.py:655
await self._player.shuffle(shuffle)
@override
async def async_select_source(self, source: str) -> None:
"""Select input source."""
if self.is_grouped and not self.is_leader:
return
# presets and inputs might have the same name; presets have priority
for input_ in self._inputs:
if source in (input_.text, input_.id):
await self._player.play_url(input_.url)
return
for preset in self._presets:
if preset.name == source:
await self._player.load_preset(preset.id)
return
raise ServiceValidationError(f"Source {source} not found")
@override
async def async_clear_playlist(self) -> None:
"""Clear players playlist."""
if self.is_grouped and not self.is_leader:
return
await self._player.clear()
@override
async def async_media_next_track(self) -> None:
"""Send media_next command to media player."""
if self.is_grouped and not self.is_leader:
return
await self._player.skip()
@overrideView on GitHub (pinned to 58a3fdb3ea)
Solutions
- Check the entity's source_list attribute and use one of those exact strings (or the input id)
- If presets/inputs recently changed on the device, wait for the next coordinator refresh or call the entity's update before selecting
- Parameterize the source name via a blueprint input or helper so renames only need one edit
Example fix
# before
- action: media_player.select_source
target:
entity_id: media_player.living_room
data:
source: Spottify
# after (match the exact name in source_list)
- action: media_player.select_source
target:
entity_id: media_player.living_room
data:
source: Spotify Defensive patterns
Strategy: validation
Validate before calling
def source_available(entity, source: str) -> bool:
sources = set(entity.source_list or [])
inputs = {i.text for i in entity._inputs} | {i.id for i in entity._inputs}
presets = {p.name for p in entity._presets}
return source in sources or source in inputs or source in presets Try / catch
from homeassistant.exceptions import ServiceValidationError
try:
await entity.async_select_source(source)
except ServiceValidationError as err:
if "not found" in str(err):
# refresh source_list and prompt user to pick a valid source Prevention
- Drive select_source from the entity's source_list attribute, not hardcoded strings
- After renaming presets/inputs on the device, update automations that reference them
When it happens
Trigger: Calling media_player.select_source with a name that is not in the player's current inputs list or presets list — e.g. a source removed on the device, a typo, or a source list that has not synced yet after startup.
Common situations: Automation hardcodes a source name the user later renamed in the Bluesound app; source selected right after HA restart before the coordinator fetched inputs/presets; using the input's URL/id instead of its display text.
Related errors
- Cannot join player to itself
- config_entry_not_loaded
- Failed to set temperature to {temperature}.
- Failed to set value.
- code_arm_required
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/342d3615a8e63d43.
Report an issue: GitHub.