{"record":{"id":"8ca68734de0922fe","repo":"home-assistant/core","slug":"invalid-sound-value","errorCode":"invalid_sound_value","errorMessage":"Invalid sound {sound} specified","messagePattern":"Invalid sound (.+?) specified","errorType":"validation","errorClass":"ServiceValidationError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/alexa_devices/services.py","lineNumber":87,"sourceCode":"\n    raise ServiceValidationError(\n        translation_domain=DOMAIN,\n        translation_key=\"config_entry_not_found\",\n        translation_placeholders={\"device_id\": device_id},\n    )\n\n\nasync def _async_execute_action(call: ServiceCall, attribute: str) -> None:\n    \"\"\"Execute action on the device.\"\"\"\n    device, config_entry = async_get_entry_id_for_service_call(call)\n    assert device.serial_number\n    value: str = call.data[attribute]\n\n    coordinator = config_entry.runtime_data\n\n    if attribute == ATTR_SOUND:\n        if value not in SOUNDS_LIST:\n            raise ServiceValidationError(\n                translation_domain=DOMAIN,\n                translation_key=\"invalid_sound_value\",\n                translation_placeholders={\"sound\": value},\n            )\n        async with alexa_api_call():\n            await coordinator.api.call_alexa_sound(\n                coordinator.data[device.serial_number], value\n            )\n    elif attribute == ATTR_TEXT_COMMAND:\n        async with alexa_api_call():\n            await coordinator.api.call_alexa_text_command(\n                coordinator.data[device.serial_number], value\n            )\n    elif attribute == ATTR_INFO_SKILL:\n        info_skill = INFO_SKILLS_MAPPING.get(value)\n        if info_skill not in ALEXA_INFO_SKILLS:\n            raise ServiceValidationError(\n                translation_domain=DOMAIN,","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/alexa_devices/services.py#L69-L105","documentation":"ServiceValidationError with translation key alexa_devices/invalid_sound_value, raised in _async_execute_action when the ATTR_SOUND value of a send_sound service call is not in SOUNDS_LIST — the fixed set of sound names the Alexa API accepts.","triggerScenarios":"Calling the alexa_devices sound/notification service with a sound string outside SOUNDS_LIST, e.g. 'custom_alarm' or a typo like 'classic_alarm ' (trailing space), or casing that does not match the list entries.","commonSituations":"Users guessing sound names instead of picking from the service selector's dropdown, YAML automations written before a sound-list change, or copy-pasting names from Amazon's app that differ from alexapy's list.","solutions":["Use the value selector in the UI (dropdown) which only offers valid sounds from SOUNDS_LIST","Check the SOUNDS_LIST in the alexa_devices integration (or alexapy) for the exact accepted spellings and correct the YAML/script","Remove trailing/leading whitespace and match casing exactly","After upgrading Home Assistant, re-check the list in case sounds were added/removed"],"exampleFix":"// before\naction:\n  domain: alexa_devices\n  data:\n    device_id: \"...\"\n    sound: \"my_sound\"\n// after\naction:\n  domain: alexa_devices\n  data:\n    device_id: \"...\"\n    sound: \"classic_alarm\"  # must be an entry of SOUNDS_LIST","handlingStrategy":"validation","validationCode":"from homeassistant.components.alexa_devices.const import SOUNDS_LIST\nif sound not in SOUNDS_LIST:\n    _LOGGER.warning(\"Unsupported sound %r; valid: %s\", sound, sorted(SOUNDS_LIST))\n    return","typeGuard":"def is_valid_sound(value: str) -> bool:\n    \"\"\"True when value is an accepted Alexa sound name.\"\"\"\n    return value in SOUNDS_LIST","tryCatchPattern":"try:\n    await hass.services.async_call(DOMAIN, \"send_sound\", service_data, blocking=True)\nexcept ServiceValidationError as err:\n    if err.translation_key == \"invalid_sound_value\":\n        _LOGGER.warning(\"Invalid sound; pick from SOUNDS_LIST\")","preventionTips":["Use the UI dropdown selector for the sound field","Validate against SOUNDS_LIST in custom scripts before calling","Re-check the list after HA upgrades; sounds can be added or removed"],"tags":["alexa-devices","service-call","validation","user-input","homeassistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}