home-assistant/core · warning · ServiceValidationError

entity_not_found

Error message

entity_not_found

What it means

ServiceValidationError with translation_key entity_not_found (bring/services.py:58), rendered as 'Failed to send reaction for Bring! — Unknown entity {entity_id}'. Raised by the send_reaction (async_send_activity_stream_reaction) service when the provided entity_id has no state object, no entry in the entity registry, or the registry entry has no config_entry_id.

Source

Thrown at homeassistant/components/bring/services.py:58

            vol.Coerce(ReactionType),
        ),
    }
)


@callback
def async_setup_services(hass: HomeAssistant) -> None:
    """Set up services for Bring! integration."""

    async def async_send_activity_stream_reaction(call: ServiceCall) -> None:
        """Send a reaction in response to recent activity of a list member."""

        if (
            not (state := hass.states.get(call.data[ATTR_ENTITY_ID]))
            or not (entity := er.async_get(hass).async_get(call.data[ATTR_ENTITY_ID]))
            or not entity.config_entry_id
        ):
            raise ServiceValidationError(
                translation_domain=DOMAIN,
                translation_key="entity_not_found",
                translation_placeholders={
                    ATTR_ENTITY_ID: call.data[ATTR_ENTITY_ID],
                },
            )
        config_entry: BringConfigEntry = service.async_get_config_entry(
            hass, DOMAIN, entity.config_entry_id
        )

        coordinator = config_entry.runtime_data.data

        list_uuid = entity.unique_id.split("_")[1]

        activity = state.attributes[EventEntityStateAttribute.EVENT_TYPE]

        reaction: ReactionType = call.data[ATTR_REACTION]

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Use the entity picker in the service call UI — it only offers valid bring activities event entities.
  2. Verify the entity exists under Developer Tools -> States before calling.
  3. If the entity was removed, reload the bring integration so the event entity is recreated, then update the automation.
  4. Pass entity_id exactly, including the correct prefix (event.* entity from the bring integration).

Example fix

# before
- action: bring.send_reaction
  data:
    entity_id: todo.groceries
    reaction: thumbs_up
# after (must be the activities event entity)
- action: bring.send_reaction
  data:
    entity_id: event.bring_activities
    reaction: thumbs_up
Defensive patterns

Strategy: validation

Validate before calling

entity_id = call.data["entity_id"]
state = hass.states.get(entity_id)
registry_entry = er.async_get(hass).async_get(entity_id)
if state is None or registry_entry is None or not registry_entry.config_entry_id:
    raise ServiceValidationError("Unknown entity")

Type guard

from homeassistant.helpers import entity_registry as er

def is_valid_bring_event_entity(hass, entity_id: str) -> bool:
    entry = er.async_get(hass).async_get(entity_id)
    return (
        hass.states.get(entity_id) is not None
        and entry is not None
        and entry.platform == "bring"
        and entry.config_entry_id is not None
    )

Try / catch

from homeassistant.exceptions import ServiceValidationError

try:
    await hass.services.async_call("bring", "send_reaction", service_data, blocking=True)
except ServiceValidationError as err:
    if err.translation_key == "entity_not_found":
        # entity removed/renamed — fix the stored entity_id
        pass
    else:
        raise

Prevention

When it happens

Trigger: Calling bring.send_reaction with an entity_id that does not exist, was renamed/deleted, belongs to another integration, or whose registry entry is not attached to a bring config entry. The triple check on hass.states.get / er.async_get / config_entry_id fails.

Common situations: Hardcoded entity_id in an automation after the event entity was removed or the integration reloaded with a different unique_id; passing a todo-list entity instead of the event entity; typo in the entity_id; entity from a different Bring account/entry.

Related errors


AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14). Data as JSON: /api/errors/08286ca2276649cd. Report an issue: GitHub.