{"record":{"id":"ab78536ed141ff0a","repo":"home-assistant/core","slug":"unsupported-sound-mode","errorCode":"unsupported_sound_mode","errorMessage":"Unsupported sound mode: {sound_mode}.","messagePattern":"Unsupported sound mode: (.+?)\\.","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/arcam_fmj/media_player.py","lineNumber":110,"sourceCode":"            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\",\n                translation_placeholders={\"sound_mode\": sound_mode},\n            ) from exception\n\n        self.async_write_ha_state()\n\n    @convert_exception\n    @override\n    async def async_set_volume_level(self, volume: float) -> None:\n        \"\"\"Set volume level, range 0..1.\"\"\"\n        await self._state.set_volume(round(volume * 99.0))\n        self.async_write_ha_state()\n\n    @convert_exception\n    @override\n    async def async_volume_up(self) -> None:\n        \"\"\"Turn volume up for media player.\"\"\"","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/arcam_fmj/media_player.py#L92-L128","documentation":"ServiceValidationError with key 'unsupported_sound_mode' from arcam_fmj async_select_sound_mode: the library's set_decode_mode(sound_mode) raised KeyError or ValueError because the string does not name a decode/sound mode the AVR supports.","triggerScenarios":"media_player.select_sound_mode is called with a mode string that set_decode_mode cannot resolve (unknown enum key or invalid value for the connected model).","commonSituations":"Sound mode names copied from another brand (e.g. 'DTS:Neural:X' vs Arcam's naming); stale YAML after firmware changed available modes; typo in a dashboard selector.","solutions":["Inspect sound_mode_list on the entity (Developer Tools -> states) and use one of those exact strings.","Correct the automation/dashboard action that sends the invalid mode.","Reload the integration after AVR firmware changes so the mode list refreshes."],"exampleFix":"// before\ndata: {sound_mode: dolby_surround\n// after\ndata: {sound_mode: Dolby Surround","handlingStrategy":"validation","validationCode":"valid_modes = entity.sound_mode_list or []\nif mode not in valid_modes:\n    raise ValueError(f\"Unsupported sound mode: {mode}\")","typeGuard":null,"tryCatchPattern":"Catch (KeyError, ValueError) around set_decode_mode and convert to ServiceValidationError with 'unsupported_sound_mode', chaining the original exception.","preventionTips":["Use sound_mode_list values verbatim in automations.","Refresh mode lists after AVR firmware updates.","Never construct mode strings dynamically without validating against the list."],"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-15T17:31:12.345Z"}