home-assistant/core · error · HomeAssistantError
effect_not_found
effect_not_found
Error message
effect_not_found
What it means
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.
Source
Thrown at homeassistant/components/blebox/light.py:246
if isinstance(value, (list, tuple)) and not any(value):
await self._feature.async_off()
return
try:
await self._feature.async_on(value)
except ValueError as exc:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="bad_value",
translation_placeholders={"error": str(exc)},
) from exc
if effect is not None:
try:
effect_value = self.effect_list.index(effect)
await self._feature.async_api_command("effect", effect_value)
except ValueError as exc:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="effect_not_found",
translation_placeholders={"error": str(exc)},
) from exc
@blebox_command
@override
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the light off."""
await self._feature.async_off()
View on GitHub (pinned to 58a3fdb3ea)
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.
Example fix
# before
await light.async_turn_on(effect="Candle")
# after
if "candle" in (light.effect_list or []):
await light.async_turn_on(effect="candle") Defensive patterns
Strategy: validation
Validate before calling
effects = light.effect_list or []
if effect not in effects:
raise ValueError(f"Unknown effect {effect!r}; valid: {effects}")
await light.async_turn_on(effect=effect) Try / catch
from homeassistant.exceptions import HomeAssistantError
try:
await light.async_turn_on(effect=effect)
except HomeAssistantError as err:
if err.translation_key == "effect_not_found":
_LOGGER.warning("Effect %r not supported; available: %s", effect, light.effect_list) Prevention
- Always source effect names from the live entity's effect_list attribute.
- Re-verify hardcoded effect names after firmware or integration updates.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/89659b07dccf4743.
Report an issue: GitHub.