{"record":{"id":"89659b07dccf4743","repo":"home-assistant/core","slug":"effect-not-found","errorCode":"effect_not_found","errorMessage":"effect_not_found","messagePattern":"effect_not_found","errorType":"validation","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/blebox/light.py","lineNumber":246,"sourceCode":"        if isinstance(value, (list, tuple)) and not any(value):\n            await self._feature.async_off()\n            return\n\n        try:\n            await self._feature.async_on(value)\n        except ValueError as exc:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"bad_value\",\n                translation_placeholders={\"error\": str(exc)},\n            ) from exc\n\n        if effect is not None:\n            try:\n                effect_value = self.effect_list.index(effect)\n                await self._feature.async_api_command(\"effect\", effect_value)\n            except ValueError as exc:\n                raise HomeAssistantError(\n                    translation_domain=DOMAIN,\n                    translation_key=\"effect_not_found\",\n                    translation_placeholders={\"error\": str(exc)},\n                ) from exc\n\n    @blebox_command\n    @override\n    async def async_turn_off(self, **kwargs: Any) -> None:\n        \"\"\"Turn the light off.\"\"\"\n        await self._feature.async_off()\n","sourceCodeStart":228,"sourceCodeEnd":257,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/blebox/light.py#L228-L257","documentation":"In blebox's light.async_turn_on, when an effect is requested the code does self.effect_list.index(effect); if the effect name is not in the entity's effect list, list.index raises ValueError, which is converted to HomeAssistantError with key 'effect_not_found'. The device was likely already turned on — only the effect application failed.","triggerScenarios":"Calling turn_on with an effect string that is not exactly one of the names in the entity's effect_list property (wrong casing, renamed effect, effect from a different light model, or empty effect list).","commonSituations":"Hardcoded effect names in scripts/automations after firmware or library changes renamed effects; copying an automation from another BleBox model; typos or case mismatches in effect names.","solutions":["Use an effect name from the entity's attributes.effect_list (check in Developer Tools > States), matching exactly.","Update scripts/automations to reference the current effect list after any firmware/library update.","If effect_list is empty, the device has no effects — remove the effect parameter."],"exampleFix":"# before\nawait light.async_turn_on(effect=\"Candle\")\n# after\nif \"candle\" in (light.effect_list or []):\n    await light.async_turn_on(effect=\"candle\")","handlingStrategy":"validation","validationCode":"effects = light.effect_list or []\nif effect not in effects:\n    raise ValueError(f\"Unknown effect {effect!r}; valid: {effects}\")\nawait light.async_turn_on(effect=effect)","typeGuard":null,"tryCatchPattern":"from homeassistant.exceptions import HomeAssistantError\n\ntry:\n    await light.async_turn_on(effect=effect)\nexcept HomeAssistantError as err:\n    if err.translation_key == \"effect_not_found\":\n        _LOGGER.warning(\"Effect %r not supported; available: %s\", effect, light.effect_list)","preventionTips":["Always source effect names from the live entity's effect_list attribute.","Re-verify hardcoded effect names after firmware or integration updates."],"tags":["home-assistant","blebox","light","effect"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}