Bring!: Grocery shopping reminder πŸ›’

Get notified when it’s time to go grocery shopping. A notification is sent when your shopping list reaches a set threshold or when urgent items are added.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: "Bring!: Grocery shopping reminder πŸ›’"
  description: "Get notified when it's time to go grocery shopping. A notification is sent when your shopping list reaches a set threshold or when urgent items are added."
  domain: automation
  author: tr4nt0r
  homeassistant:
    min_version: 2024.10.0
  input:
    shopping_list:
      name: "Shopping List"
      description: "Select the Bring! shopping list to monitor."
      selector:
        entity:
          filter:
            - integration: bring
              domain: todo
    items_threshold:
      name: "Item threshold"
      description: "Set the number of items that will trigger a notification when exceeded."
      default: 10
      selector:
        number:
          min: 1
          max: 999
          unit_of_measurement: "items"
          mode: box
    urgent_sensor:
      name: "Urgent items sensor"
      description: "Select the sensor that tracks urgent items on the shopping list."
      selector:
        entity:
          filter:
            - integration: bring
              domain: sensor
    items_threshold_action:
      name: "Long shopping list notification"
      description: "Specify the action to take when the shopping list exceeds the defined item threshold."
      selector:
        action: {}
      default:
        [
          {
            "action": "notify.notify",
            "metadata": {},
            "data":
              {
                "message": "The list is getting long, plan a trip to the grocery shop in the next days",
                "title": "Shopping needed soon πŸ›’",
              },
          },
        ]
    urgent_action:
      name: "Notification for urgent items"
      description: "Define the action to take when urgent items are added to the shopping list."
      selector:
        action: {}
      default:
        [
          {
            "action": "notify.notify",
            "metadata": {},
            "data":
              {
                "title": "🚨 Time to go shopping! πŸ›’",
                "message": "Urgent groceries needed! Grab your shopping bag and go!",
              },
          },
        ]
triggers:
  - trigger: numeric_state
    entity_id: !input shopping_list
    above: !input items_threshold
    id: shopping list too long
  - trigger: numeric_state
    entity_id: !input urgent_sensor
    above: 0
    id: shopping is urgent
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - shopping list too long
        sequence:
          - action: !input items_threshold_action
      - conditions:
          - condition: trigger
            id:
              - shopping is urgent
        sequence:
          - action: !input urgent_action
  - delay:
      hours: 1
      minutes: 0
      seconds: 0
      milliseconds: 0
mode: single