home-assistant/core · warning · ServiceValidationError

activity_not_found

Error message

activity_not_found

What it means

ServiceValidationError with translation_key activity_not_found (bring/services.py:78), rendered as 'Failed to send reaction for Bring! — No recent activity found'. Raised by send_reaction when the selected activities event entity has an empty event_type attribute (state.attributes[EventEntityStateAttribute.EVENT_TYPE] is falsy) — i.e. the list has no recent activity to react to.

Source

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

                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]

        if not activity:
            raise ServiceValidationError(
                translation_domain=DOMAIN,
                translation_key="activity_not_found",
            )
        try:
            await coordinator.bring.notify(
                list_uuid,
                BringNotificationType.LIST_ACTIVITY_STREAM_REACTION,
                receiver=state.attributes[ATTR_RECEIVER],
                activity=state.attributes[ATTR_ACTIVITY],
                activity_type=ActivityType(activity.upper()),
                reaction=reaction,
            )
        except (BringRequestException, BringAuthException) as e:
            raise HomeAssistantError(
                translation_domain=DOMAIN,
                translation_key="reaction_request_failed",
            ) from e

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Wait until a list member actually adds/changes/removes items so the event entity records activity, then call send_reaction.
  2. Trigger the service from an event/state automation on the activities entity so it only runs after a real event.
  3. Verify in Developer Tools -> States that the event entity has a non-empty event_type attribute before calling.
  4. If the attribute should be populated but is not, reload the bring integration to refresh the activity stream.

Example fix

# before (fires blindly)
- action: bring.send_reaction
  data: {entity_id: event.bring_activities, reaction: thumbs_up}
# after (only react after an activity event)
- trigger: {platform: state, entity_id: event.bring_activities}
- action: bring.send_reaction
  data: {entity_id: event.bring_activities, reaction: thumbs_up}
Defensive patterns

Strategy: validation

Validate before calling

attrs = hass.states.get(entity_id).attributes
event_type = attrs.get("event_type")
if not event_type:
    raise ServiceValidationError("No recent activity on this list; nothing to react to")

Type guard

def has_recent_activity(state) -> bool:
    return bool(state and state.attributes.get("event_type"))

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 == "activity_not_found":
        # wait for a real activity event before reacting
        pass
    else:
        raise

Prevention

When it happens

Trigger: Calling bring.send_reaction against an activities event entity that has never fired (or its event attributes were cleared): the code reads the event_type attribute and, if empty, refuses to send because there is no activity to attach the reaction to.

Common situations: Manually testing the service on a freshly loaded list with no member activity yet; triggering from a stale automation after the event entity reset; list members inactive so no recent events exist.

Related errors


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