home-assistant/core · warning · ServiceValidationError

notify_missing_argument

Error message

notify_missing_argument

What it means

Raised as ServiceValidationError when coordinator.bring.notify() raises ValueError, which the bring-api library does when the chosen BringNotificationType requires an item argument but none was supplied. It is a user-input error, not a network error: the service call is invalid before any request is made.

Source

Thrown at homeassistant/components/bring/todo.py:257

        await self.coordinator.async_refresh()

    async def async_send_message(
        self,
        message: BringNotificationType,
        item: str | None = None,
    ) -> None:
        """Send a push notification to members of a shared bring list."""

        try:
            await self.coordinator.bring.notify(self._list_uuid, message, item or None)
        except BringRequestException as e:
            raise HomeAssistantError(
                translation_domain=DOMAIN,
                translation_key="notify_request_failed",
            ) from e
        except ValueError as e:
            raise ServiceValidationError(
                translation_domain=DOMAIN,
                translation_key="notify_missing_argument",
                translation_placeholders={"field": "item"},
            ) from e

View on GitHub (pinned to 58a3fdb3ea)

Solutions

  1. Supply the item text (e.g. the product name) when calling notification types that require it.
  2. Check the bring-api BringNotificationType enum docs/source for which types have ITEM required semantics.
  3. If you do not want to reference a product, switch to a notification type that does not need an item.

Example fix

// before
await todo_list.async_send_message(BringNotificationType.URGENT_MESSAGE)

// after
await todo_list.async_send_message(BringNotificationType.URGENT_MESSAGE, item="Milk")
Defensive patterns

Strategy: validation

Validate before calling

def notification_needs_item(message: BringNotificationType) -> bool:
    """Return True for notification types whose API contract requires an item."""
    return message in _ITEM_REQUIRED_TYPES  # e.g. {BringNotificationType.URGENT_MESSAGE}

if notification_needs_item(message) and not item:
    raise ValueError("This notification type requires an item")

Type guard

def is_item_message(message: BringNotificationType) -> bool:
    """Narrow to notification types that carry a product reference."""
    return message.value in _ITEM_REQUIRED_VALUES

Try / catch

try:
    await todo_list.async_send_message(message, item)
except ServiceValidationError as err:
    if err.translation_key == "notify_missing_argument":
        item = item or default_product
        await todo_list.async_send_message(message, item)
    else:
        raise

Prevention

When it happens

Trigger: Sending a notification type such as URGENT_MESSAGE (or any type flagged as requiring an item) with item=None. The library's notify(list_uuid, message, None) validates arguments and raises ValueError, which the integration maps to notify_missing_argument with field 'item'.

Common situations: Automations or scripts calling notification types that reference a product, forgetting the optional item field; UI integrations that omit the text parameter.

Related errors


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