Automation when input button is pressed by a specific person(on the mobile app)

Hi, as the title says I want to trigger an automation when an input button is pressed by a specific person on a mobile phone. I can’t figure out how to check for which person pressed the input button.

As long as the user and person are linked by turning on “Allow person to login”, you can use the following:

alias: Person A Pressed the Button
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.button_1
condition:
  -  "{{ trigger.to_state.context.user_id == state_attr('person.a', 'user_id') }}"
action:
....