{"record":{"id":"eb60eb5eaf608ca6","repo":"home-assistant/core","slug":"unsupported-source","errorCode":"unsupported_source","errorMessage":"Unsupported source: {source}.","messagePattern":"Unsupported source: (.+?)\\.","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/arcam_fmj/media_player.py","lineNumber":94,"sourceCode":"        if power is None:\n            return None\n        return MediaPlayerState.ON if power else MediaPlayerState.OFF\n\n    @convert_exception\n    @override\n    async def async_mute_volume(self, mute: bool) -> None:\n        \"\"\"Send mute command.\"\"\"\n        await self._state.set_mute(mute)\n        self.async_write_ha_state()\n\n    @convert_exception\n    @override\n    async def async_select_source(self, source: str) -> None:\n        \"\"\"Select a specific source.\"\"\"\n        try:\n            value = SourceCodes[source]\n        except KeyError as exception:\n            raise ServiceValidationError(\n                translation_domain=DOMAIN,\n                translation_key=\"unsupported_source\",\n                translation_placeholders={\"source\": source},\n            ) from exception\n\n        await self._state.set_source(value)\n        self.async_write_ha_state()\n\n    @convert_exception\n    @override\n    async def async_select_sound_mode(self, sound_mode: str) -> None:\n        \"\"\"Select a specific source.\"\"\"\n        try:\n            await self._state.set_decode_mode(sound_mode)\n        except (KeyError, ValueError) as exception:\n            raise ServiceValidationError(\n                translation_domain=DOMAIN,\n                translation_key=\"unsupported_sound_mode\",","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/arcam_fmj/media_player.py#L76-L112","documentation":"ServiceValidationError with key 'unsupported_source' from arcam_fmj async_select_source: the requested source name is not a member of the SourceCodes enum in the arcam-fmj library, so it cannot be mapped to a command for the AVR.","triggerScenarios":"media_player.select_source is called with a string that is not a valid SourceCodes key (KeyError on SourceCodes[source]); e.g. a source name from a template/script typo or one that exists on a different AVR generation.","commonSituations":"Hardcoded source names in scripts/automations that drift from the device's actual source list; copied YAML between different Arcam models; case-sensitive mismatch ('TV' vs 'tv').","solutions":["Call the media player's source_list / browse sources in Developer Tools to see valid names and use exactly those.","Fix the typo/casing in the automation or script that invokes select_source.","Update the arcam-fmj library if your model's source codes were added after your installed version."],"exampleFix":"// before\naction:\n  - service: media_player.select_source\n    target: {entity_id: media_player.arcam\n    data: {source: Tv\n// after\naction:\n  - service: media_player.select_source\n    target: {entity_id: media_player.arcam\n    data: {source: TV}","handlingStrategy":"validation","validationCode":"from arcam_fmj.source_codes import SourceCodes  # or the library's enum module\n\ndef is_valid_source(source: str) -> bool:\n    return source in SourceCodes.__members__","typeGuard":null,"tryCatchPattern":"Catch KeyError on SourceCodes[source] and raise ServiceValidationError with translation_placeholders={'source': source} (integration pattern) so the UI shows which value failed.","preventionTips":["Drive select_source automations from the entity's live source_list rather than hardcoded strings.","Validate source names against SourceCodes members before calling.","Watch for casing differences; enum keys are case-sensitive."],"tags":["home-assistant","arcam-fmj","media-player","validation","service-action"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}