Counter number input from Notifications

So, I’ve only so far used the UI for automations, but I’m wanting to go further than the UI will let me. I’m still very new to yaml.

Also, I’m doing this on mobile, so the formatting is shocking, sorry.

I have a counter that tracks my dishwasher tablets.

I’m trying to have a way, that when I restock the tablets, I can input what I need, preferably into a notification reply (for wife approval), adding to the current amount on the counter.

Having pre-existing amounts as a “reply” would also work. I did read about that option earlier, but I can’t find the page again.

I can currently send a notification that allows a reply input.

How do I link them?

My dishwasher restock automation;

alias: Dishwasher tablet restocking
description: ""
triggers:
  - trigger: tag
    tag_id: 1ee3f34d-0eae-4bd5-aae4-8d9cff5f0df6
conditions: []
actions:
  - action: notify.mobile_app_pixel_7
    metadata: {}
    data:
      data:
        actions:
          - action: REPLY
            title: Answer
      message: Dishwasher Tablets have been restocked, how many should be added?
mode: single

My tablet counter id;
Counter.dishwasher_tablets

Dishwasher tablet pack size id;
input_number.dishwasher_tablet_pack_size

I believe this is the code I need to implement;

action:
      service: input_number.set_value
      data:
        entity_id: input_number.current
        value: value: "{{ states('Counter.dishwasher_tablets') | int + states('input_number.dishwasher_tablet_pack_size') | int }}"

Select your configuration text and press the “Preformatted text” button </> in the header.

You need to use a Wait fro trigger as shown in the actionable notification examples.

Why ask for a value as the reply if you will just be using the value from the input number’s state?